3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test(array $classes) { array_map(function(stdClass $class) {}, $classes); } test([new stdClass, new stdClass]); test([new stdClass, 1, 2]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rP5ZD
function name:  (null)
number of ops:  18
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'test'
          1        NEW                                              $0      'stdClass'
          2        DO_FCALL                                      0          
          3        INIT_ARRAY                                       ~2      $0
          4        NEW                                              $3      'stdClass'
          5        DO_FCALL                                      0          
          6        ADD_ARRAY_ELEMENT                                ~2      $3
          7        SEND_VAL                                                 ~2
          8        DO_FCALL                                      0          
    9     9        INIT_FCALL                                               'test'
         10        NEW                                              $6      'stdClass'
         11        DO_FCALL                                      0          
         12        INIT_ARRAY                                       ~8      $6
         13        ADD_ARRAY_ELEMENT                                ~8      1
         14        ADD_ARRAY_ELEMENT                                ~8      2
         15        SEND_VAL                                                 ~8
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/rP5ZD
function name:  test
number of ops:  7
compiled vars:  !0 = $classes
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'array_map'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FrP5ZD%3A5%240'
          3        SEND_VAL                                                 ~1
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
    6     6      > RETURN                                                   null

End of function test

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

End of function %00%7Bclosure%7D%2Fin%2FrP5ZD%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.13 ms | 1398 KiB | 17 Q