Pyh.conf’25: a new PHP conference for the Russian-speaking community

Voting

: three plus two?
(Example: nine)

The Note You're Voting On

german dot bernhardt at gmail dot com
9 years ago
<?php
# ERROR GLOBAL VARIABLES IMPORT

$tester=true;

function
tester(){
global
$tester;
var_dump($tester);
}

tester(); // PRINT -> bool(true)

class test extends Thread{
public function
run(){
global
$tester;
tester(); // PRINT -> NULL
}
}
$workers=new test();
$workers->start();

?>

<< Back to user notes page

To Top