vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Don't take vB's code as a model for perfect coding! (https://vborg.vbsupport.ru/showthread.php?t=50148)

filburt1 03-16-2003 12:06 AM

Whoops, didn't see that bit. :)

Dean C 03-16-2003 08:44 AM

Quote:

$_FILES = &$HTTP_POST_FILES;
Oh no ampersand when assigning variables. This is going to confuse me majorly as i still don't understand the concept :(

- miSt

Scott MacVicar 03-16-2003 11:07 AM

ampersand means you are referncing the variables.

PHP Code:

$array = array();
$newarray = &$array;
$array[] = 'test';
$array[] = 'cows';
print_r($newarray); 

basically you can change array and the values are reflected in $newarray.

Dean C 03-16-2003 11:09 AM

*Kinda understands*

- miSt

filburt1 03-16-2003 02:16 PM

It's a pointer:
PHP Code:

$a = &$b

So any time you modify $a you modify $b.

Dean C 03-16-2003 05:16 PM

I finally learnt this after reading a section from SAMS learn PHP in 24 hours :)

The books is good so far :D

- miSt

filburt1 03-16-2003 05:21 PM

I told you and everybody I know, Sams books are awesome :)

NTLDR 03-16-2003 06:33 PM

Personally I find the way the vB2 code is currently written far easier to read than all your examples of how to do it "correctly", but thats just me. I tend to be quite picky about how I lay my code out and do it in the way that I find easiest to read myself.

refertech 03-16-2003 06:51 PM

Oh, man I just left Barns and Noble and didnt buy that book. S**t, I guess ill have to go back. So that is the best book to starter with?

Mark

Dean C 03-16-2003 06:56 PM

SAMS php in 24 hours is awesome. I'd reccomend it so far :D

- miSt


All times are GMT. The time now is 11:01 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01282 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete