3v4l.org

run code in 300+ PHP versions simultaneously
<?php print now(); ?> private $foobar = [1,2,3]; public function setFoobar($value) { $this->foobar = $value; } public function printItem($index){ echo($this->foobar[$index]); } } class AChild extends ExtendThis{ } $inst = new AChild; $inst->setFoobar([4,5,6]); $inst->printItem(0);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/A8LrQ
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'now'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
    4     3        ECHO                                                     '++++private+%24foobar+%3D+%5B1%2C2%2C3%5D%3B%0A%0A++++public+function+setFoobar%28%24value%29+%7B%0A%09%09%24this-%3Efoobar+%3D+%24value%3B%0A++++%7D%0A%0A++++public+function+printItem%28%24index%29%7B%0A++++++++echo%28%24this-%3Efoobar%5B%24index%5D%29%3B%0A++++%7D%0A%7D%0A%0Aclass+AChild+extends+ExtendThis%7B%0A%0A%7D%0A%0A%24inst+%3D+new+AChild%3B%0A%24inst-%3EsetFoobar%28%5B4%2C5%2C6%5D%29%3B%0A%24inst-%3EprintItem%280%29%3B'
   21     4      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.16 ms | 1384 KiB | 13 Q