3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public static function testMethod() { return 'asdf'; } } $class = 'Test'; $test = <<<TEST Hopefully this works: {$class::testMethod() } TEST; echo $test;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TABpo
function name:  (null)
number of ops:  9
compiled vars:  !0 = $class, !1 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   ASSIGN                                                   !0, 'Test'
   14     1        NOP                                                      
          2        FETCH_CLASS                                   0  $3      !0
          3        INIT_STATIC_METHOD_CALL                                  $3, 'testMethod'
          4        DO_FCALL                                      0  $4      
          5        FAST_CONCAT                                      ~5      'Hopefully+this+works%3A+', $4
   13     6        ASSIGN                                                   !1, ~5
   16     7        ECHO                                                     !1
   17     8      > RETURN                                                   1

Class Test:
Function testmethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TABpo
function name:  testMethod
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E > > RETURN                                                   'asdf'
    8     1*     > RETURN                                                   null

End of function testmethod

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
144.29 ms | 1393 KiB | 13 Q