3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar = 0; private $bar2 = 0; public function makeItFive($variable) { $this->$variable = 5; return $this->$variable; } } $test = new Foo(); print $test->makeItFive("bar"); print $test->makeItFive("bar2");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/900ig
function name:  (null)
number of ops:  12
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   NEW                                              $1      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   14     3        INIT_METHOD_CALL                                         !0, 'makeItFive'
          4        SEND_VAL_EX                                              'bar'
          5        DO_FCALL                                      0  $4      
          6        ECHO                                                     $4
   15     7        INIT_METHOD_CALL                                         !0, 'makeItFive'
          8        SEND_VAL_EX                                              'bar2'
          9        DO_FCALL                                      0  $5      
         10        ECHO                                                     $5
         11      > RETURN                                                   1

Class Foo:
Function makeitfive:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/900ig
function name:  makeItFive
number of ops:  6
compiled vars:  !0 = $variable
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ASSIGN_OBJ                                               !0
          2        OP_DATA                                                  5
    9     3        FETCH_OBJ_R                                      ~2      !0
          4      > RETURN                                                   ~2
   10     5*     > RETURN                                                   null

End of function makeitfive

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.41 ms | 1393 KiB | 13 Q