3v4l.org

run code in 300+ PHP versions simultaneously
<?php $e1 = new stdClass(); $e2 = new stdClass(); $e1->test = 'hola'; $e2->test = 'caracola'; $a = array($e1, $e2); $b = array_map(function($e) { return $e->test; }, $a); echo implode(', ', $a) . '<br/>'; echo implode(', ', $b) . '<br/>'; ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ssZ1B
function name:  (null)
number of ops:  32
compiled vars:  !0 = $e1, !1 = $e2, !2 = $a, !3 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   NEW                                              $4      'stdClass'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $4
    3     3        NEW                                              $7      'stdClass'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $7
    4     6        ASSIGN_OBJ                                               !0, 'test'
          7        OP_DATA                                                  'hola'
    5     8        ASSIGN_OBJ                                               !1, 'test'
          9        OP_DATA                                                  'caracola'
    6    10        INIT_ARRAY                                       ~12     !0
         11        ADD_ARRAY_ELEMENT                                ~12     !1
         12        ASSIGN                                                   !2, ~12
    7    13        INIT_FCALL                                               'array_map'
         14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FssZ1B%3A7%240'
         15        SEND_VAL                                                 ~14
         16        SEND_VAR                                                 !2
         17        DO_ICALL                                         $15     
         18        ASSIGN                                                   !3, $15
    8    19        INIT_FCALL                                               'implode'
         20        SEND_VAL                                                 '%2C+'
         21        SEND_VAR                                                 !2
         22        DO_ICALL                                         $17     
         23        CONCAT                                           ~18     $17, '%3Cbr%2F%3E'
         24        ECHO                                                     ~18
    9    25        INIT_FCALL                                               'implode'
         26        SEND_VAL                                                 '%2C+'
         27        SEND_VAR                                                 !3
         28        DO_ICALL                                         $19     
         29        CONCAT                                           ~20     $19, '%3Cbr%2F%3E'
         30        ECHO                                                     ~20
   10    31      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FssZ1B%3A7%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
142.84 ms | 1396 KiB | 17 Q