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); for ($i = 0; $i < 10000; $i++) { array_walk_recursive($arr, 'foo'); } $end = microtime(true) - $start; echo "Run: " . $end . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 12
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 14, Position 2 = 7
Branch analysis from position: 14
Branch analysis from position: 7
filename:       /in/v1kYb
function name:  (null)
number of ops:  23
compiled vars:  !0 = $arr, !1 = $start, !2 = $i, !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        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->12
   10     7    >   INIT_FCALL                                               'array_walk_recursive'
          8        SEND_REF                                                 !0
          9        SEND_VAL                                                 'foo'
         10        DO_ICALL                                                 
    9    11        PRE_INC                                                  !2
         12    >   IS_SMALLER                                               !2, 10000
         13      > JMPNZ                                                    ~10, ->7
   12    14    >   INIT_FCALL                                               'microtime'
         15        SEND_VAL                                                 <true>
         16        DO_ICALL                                         $11     
         17        SUB                                              ~12     $11, !1
         18        ASSIGN                                                   !3, ~12
   14    19        CONCAT                                           ~14     'Run%3A+', !3
         20        CONCAT                                           ~15     ~14, '%0A'
         21        ECHO                                                     ~15
         22      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v1kYb
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:
154.82 ms | 1396 KiB | 17 Q