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."::"; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cMN9
function name:  (null)
number of ops:  2
compiled vars:  !0 = $test_global
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'hello+world'
   13     1      > RETURN                                                   1

Class MyClass:
Function value:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7cMN9
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:
148.69 ms | 1393 KiB | 13 Q