3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { private static $test = '1'; private static $shmest = '2'; public static function bar($text) { var_dump(self::$$text); } } echo Foo::bar('test') . PHP_EOL; echo Foo::bar('shmest') . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/21CLo
function name:  (null)
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
          1        SEND_VAL                                                 'test'
          2        DO_FCALL                                      0  $0      
          3        CONCAT                                           ~1      $0, '%0A'
          4        ECHO                                                     ~1
   12     5        INIT_STATIC_METHOD_CALL                                  'Foo', 'bar'
          6        SEND_VAL                                                 'shmest'
          7        DO_FCALL                                      0  $2      
          8        CONCAT                                           ~3      $2, '%0A'
          9        ECHO                                                     ~3
         10      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/21CLo
function name:  bar
number of ops:  6
compiled vars:  !0 = $text
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'var_dump'
          2        FETCH_STATIC_PROP_R          unknown             ~1      !0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                                 
    8     5      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.5 ms | 1395 KiB | 15 Q