3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('a' => 12, 'b' => 'foo', 'caution' => array('blubb' => array('bar' => 'baz'))); function foo(&$item, $key) { $item = (object)$item; } $start = microtime(true); $obj1 = array_walk_recursive($arr, 'foo'); $end = microtime(true) - $start; echo "Run: " . $end . PHP_EOL; var_dump($arr);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FDkSa
function name:  (null)
number of ops:  22
compiled vars:  !0 = $arr, !1 = $start, !2 = $obj1, !3 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    8     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $5      
          4        ASSIGN                                                   !1, $5
    9     5        INIT_FCALL                                               'array_walk_recursive'
          6        SEND_REF                                                 !0
          7        SEND_VAL                                                 'foo'
          8        DO_ICALL                                         $7      
          9        ASSIGN                                                   !2, $7
   10    10        INIT_FCALL                                               'microtime'
         11        SEND_VAL                                                 <true>
         12        DO_ICALL                                         $9      
         13        SUB                                              ~10     $9, !1
         14        ASSIGN                                                   !3, ~10
   12    15        CONCAT                                           ~12     'Run%3A+', !3
         16        CONCAT                                           ~13     ~12, '%0A'
         17        ECHO                                                     ~13
   13    18        INIT_FCALL                                               'var_dump'
         19        SEND_VAR                                                 !0
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/FDkSa
function name:  foo
number of ops:  5
compiled vars:  !0 = $item, !1 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    5     2        CAST                                          8  ~2      !0
          3        ASSIGN                                                   !0, ~2
    6     4      > RETURN                                                   null

End of function foo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.5 ms | 1387 KiB | 19 Q