3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tryme = 10; function Test() { global $tryme; $tryme += 10; echo $tryme,"\n"; } class TestClass { static $tryme = 10; static function Test() { self::$tryme += 10; echo self::$tryme,"\n"; } } Test(); // 20 TestClass::Test();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kv7um
function name:  (null)
number of ops:  6
compiled vars:  !0 = $tryme
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, 10
   15     1        INIT_FCALL                                               'test'
          2        DO_FCALL                                      0          
   16     3        INIT_STATIC_METHOD_CALL                                  'TestClass', 'Test'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kv7um
function name:  Test
number of ops:  5
compiled vars:  !0 = $tryme
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   BIND_GLOBAL                                              !0, 'tryme'
    5     1        ASSIGN_OP                                     1          !0, 10
    6     2        ECHO                                                     !0
          3        ECHO                                                     '%0A'
    7     4      > RETURN                                                   null

End of function test

Class TestClass:
Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/kv7um
function name:  Test
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN_STATIC_PROP_OP                         1          'tryme'
          1        OP_DATA                                                  10
   12     2        FETCH_STATIC_PROP_R          unknown             ~1      'tryme'
          3        ECHO                                                     ~1
          4        ECHO                                                     '%0A'
   13     5      > RETURN                                                   null

End of function test

End of class TestClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.08 ms | 1398 KiB | 14 Q