3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); class a { function b($var) { return $var . 'x'; } } print_r(a.b("ciao"));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mVktc
function name:  (null)
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 0
          2        DO_ICALL                                                 
   12     3        INIT_FCALL                                               'print_r'
          4        FETCH_CONSTANT                                   ~1      'a'
          5        INIT_FCALL_BY_NAME                                       'b'
          6        SEND_VAL_EX                                              'ciao'
          7        DO_FCALL                                      0  $2      
          8        CONCAT                                           ~3      ~1, $2
          9        SEND_VAL                                                 ~3
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class a:
Function b:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mVktc
function name:  b
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        CONCAT                                           ~1      !0, 'x'
          2      > RETURN                                                   ~1
    9     3*     > RETURN                                                   null

End of function b

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.52 ms | 1395 KiB | 17 Q