3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CString { public static function fun3($str){ return strtoupper($str); } public function fun4($str){ return strtoupper($str); } } class Test { public function fun1(){ echo __FUNCTION__; } public function fun2(){ $a = 'bbb'; echo preg_replace_callback('/.*/', function($find){return $this->fun1();}, 'test'); } } $cs = new CString; $t = new Test; $t->fun2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2J0cL
function name:  (null)
number of ops:  9
compiled vars:  !0 = $cs, !1 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   NEW                                              $2      'CString'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   26     3        NEW                                              $5      'Test'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $5
   28     6        INIT_METHOD_CALL                                         !1, 'fun2'
          7        DO_FCALL                                      0          
          8      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F2J0cL%3A21%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2J0cL
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $find
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   RECV                                             !0      
          1        FETCH_THIS                                       $1      
          2        INIT_METHOD_CALL                                         $1, 'fun1'
          3        DO_FCALL                                      0  $2      
          4      > RETURN                                                   $2
          5*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F2J0cL%3A21%240

Class CString:
Function fun3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2J0cL
function name:  fun3
number of ops:  6
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
    6     5*     > RETURN                                                   null

End of function fun3

Function fun4:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2J0cL
function name:  fun4
number of ops:  6
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        INIT_FCALL                                               'strtoupper'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   10     5*     > RETURN                                                   null

End of function fun4

End of class CString.

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

End of function fun1

Function fun2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2J0cL
function name:  fun2
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E >   ASSIGN                                                   !0, 'bbb'
   21     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F.%2A%2F'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F2J0cL%3A21%240'
          4        SEND_VAL                                                 ~2
          5        SEND_VAL                                                 'test'
          6        DO_ICALL                                         $3      
          7        ECHO                                                     $3
   22     8      > RETURN                                                   null

End of function fun2

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.38 ms | 1400 KiB | 17 Q