3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array('a' => 12, 'b' => 'foo', 'caution' => array('blubb' => array('bar' => 'baz'))); $start = microtime(true); for ($i = 0; $i < 10000; $i++) { $obj1 = json_decode(json_encode($arr), false); } $end = microtime(true) - $start; echo "Run: " . sprintf('%.08f', $end) . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 16
Branch analysis from position: 16
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 7
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 18, Position 2 = 7
Branch analysis from position: 18
Branch analysis from position: 7
filename:       /in/7Kf3t
function name:  (null)
number of ops:  31
compiled vars:  !0 = $arr, !1 = $start, !2 = $i, !3 = $obj1, !4 = $end
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'microtime'
          2        SEND_VAL                                                 <true>
          3        DO_ICALL                                         $6      
          4        ASSIGN                                                   !1, $6
    5     5        ASSIGN                                                   !2, 0
          6      > JMP                                                      ->16
    6     7    >   INIT_FCALL                                               'json_decode'
          8        INIT_FCALL                                               'json_encode'
          9        SEND_VAR                                                 !0
         10        DO_ICALL                                         $9      
         11        SEND_VAR                                                 $9
         12        SEND_VAL                                                 <false>
         13        DO_ICALL                                         $10     
         14        ASSIGN                                                   !3, $10
    5    15        PRE_INC                                                  !2
         16    >   IS_SMALLER                                               !2, 10000
         17      > JMPNZ                                                    ~13, ->7
    8    18    >   INIT_FCALL                                               'microtime'
         19        SEND_VAL                                                 <true>
         20        DO_ICALL                                         $14     
         21        SUB                                              ~15     $14, !1
         22        ASSIGN                                                   !4, ~15
   10    23        INIT_FCALL                                               'sprintf'
         24        SEND_VAL                                                 '%25.08f'
         25        SEND_VAR                                                 !4
         26        DO_ICALL                                         $17     
         27        CONCAT                                           ~18     'Run%3A+', $17
         28        CONCAT                                           ~19     ~18, '%0A'
         29        ECHO                                                     ~19
         30      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
192.66 ms | 1401 KiB | 21 Q