3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { private $privateProperty = "hello"; public function myMethod() { $map = array_map( function($value) { return "Bob"; // $this->privateProperty." ".$value; }, array( "city", "world", "universe" ) ); return $map; } } $test = new Test(); print_r($test->myMethod());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5iquH
function name:  (null)
number of ops:  9
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_FCALL                                               'print_r'
          4        INIT_METHOD_CALL                                         !0, 'myMethod'
          5        DO_FCALL                                      0  $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
          8      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F5iquH%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5iquH
function name:  {closure}
number of ops:  3
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1      > RETURN                                                   'Bob'
   10     2*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F5iquH%3A8%240

Class Test:
Function mymethod:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5iquH
function name:  myMethod
number of ops:  8
compiled vars:  !0 = $map
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'array_map'
    8     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F5iquH%3A8%240'
   10     2        SEND_VAL                                                 ~1
   12     3        SEND_VAL                                                 <array>
          4        DO_ICALL                                         $2      
    7     5        ASSIGN                                                   !0, $2
   17     6      > RETURN                                                   !0
   18     7*     > RETURN                                                   null

End of function mymethod

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.68 ms | 1395 KiB | 17 Q