3v4l.org

run code in 300+ PHP versions simultaneously
<?php const VAL_1 = 1; const VAL_2 = 2; class Thing { public function doStuff() { return VAL_1 . ', ' . VAL_2; } } $thing = new Thing; echo $thing->doStuff();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p6maA
function name:  (null)
number of ops:  9
compiled vars:  !0 = $thing
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                            'VAL_1', 1
    4     1        DECLARE_CONST                                            'VAL_2', 2
   14     2        NEW                                              $1      'Thing'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   15     5        INIT_METHOD_CALL                                         !0, 'doStuff'
          6        DO_FCALL                                      0  $4      
          7        ECHO                                                     $4
          8      > RETURN                                                   1

Class Thing:
Function dostuff:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p6maA
function name:  doStuff
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   FETCH_CONSTANT                                   ~0      'VAL_1'
          1        CONCAT                                           ~1      ~0, '%2C+'
          2        FETCH_CONSTANT                                   ~2      'VAL_2'
          3        CONCAT                                           ~3      ~1, ~2
          4      > RETURN                                                   ~3
   11     5*     > RETURN                                                   null

End of function dostuff

End of class Thing.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.2 ms | 1394 KiB | 13 Q