3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test_global = "hello world"; class MyClass { public function value($enum) { global $test_global; echo "mytest.global::".$test_global."::"; } } MyClass::value('Foo');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nl5aZ
function name:  (null)
number of ops:  5
compiled vars:  !0 = $test_global
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'hello+world'
   15     1        INIT_STATIC_METHOD_CALL                                  'MyClass', 'value'
          2        SEND_VAL                                                 'Foo'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class MyClass:
Function value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nl5aZ
function name:  value
number of ops:  6
compiled vars:  !0 = $enum, !1 = $test_global
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    9     1        BIND_GLOBAL                                              !1, 'test_global'
   11     2        CONCAT                                           ~2      'mytest.global%3A%3A', !1
          3        CONCAT                                           ~3      ~2, '%3A%3A'
          4        ECHO                                                     ~3
   12     5      > RETURN                                                   null

End of function value

End of class MyClass.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.26 ms | 1393 KiB | 13 Q