3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function menuPokaz($id, $id_menu2=0) { echo 'jakaś tam treść'; $drzewo = $this->menuPokaz($id, $row['id_menu']); echo $drzewo; } $id = 4; $mm = 4; $row["id_menu"] = 8; // globalna menuPokaz($id,$mm);
Output for 7.0.0 - 7.2.0
jakaś tam treść Fatal error: Uncaught Error: Using $this when not in object context in /in/HUCev:4 Stack trace: #0 /in/HUCev(11): menuPokaz(4, 4) #1 {main} thrown in /in/HUCev on line 4
Process exited with code 255.
Output for 5.3.22 - 5.6.28
jakaś tam treść Fatal error: Using $this when not in object context in /in/HUCev on line 4
Process exited with code 255.