3v4l.org

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

Class test:
Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SHkqD
function name:  foo
number of ops:  5
compiled vars:  !0 = $name, !1 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    8     2        ASSIGN_OBJ                                               !0
          3        OP_DATA                                                  !1
    9     4      > RETURN                                                   null

End of function foo

End of class test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.95 ms | 1386 KiB | 15 Q