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(){ static $var = 1; echo $var++; } public function fun2(){ $a = 'bbb'; echo preg_replace_callback('/.*/', function($find){return $this->fun1();}, 'test'); } } $t = new Test; $t->fun2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BFcZR
function name:  (null)
number of ops:  6
compiled vars:  !0 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   26     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   28     3        INIT_METHOD_CALL                                         !0, 'fun2'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FBFcZR%3A22%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BFcZR
function name:  {closure}
number of ops:  6
compiled vars:  !0 = $find
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     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%2FBFcZR%3A22%240

Class CString:
Function fun3:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/BFcZR
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/BFcZR
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/BFcZR
function name:  fun1
number of ops:  4
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   BIND_STATIC                                              !0
   17     1        POST_INC                                         ~1      !0
          2        ECHO                                                     ~1
   18     3      > 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/BFcZR
function name:  fun2
number of ops:  9
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   ASSIGN                                                   !0, 'bbb'
   22     1        INIT_FCALL                                               'preg_replace_callback'
          2        SEND_VAL                                                 '%2F.%2A%2F'
          3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FBFcZR%3A22%240'
          4        SEND_VAL                                                 ~2
          5        SEND_VAL                                                 'test'
          6        DO_ICALL                                         $3      
          7        ECHO                                                     $3
   23     8      > RETURN                                                   null

End of function fun2

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.34 ms | 1400 KiB | 17 Q