3v4l.org

run code in 300+ PHP versions simultaneously
<?php $a = range(0,10000); $start = microtime(TRUE); md5(serialize($a)); echo "md5(serialize..:" . (microtime(TRUE) - $start) . "\n"; $start = microtime(TRUE); md5(json_encode($a)); echo "md5(json_encode..:" . (microtime(TRUE)-$start) . "\n";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/3ca4h
function name:  (null)
number of ops:  40
compiled vars:  !0 = $a, !1 = $start
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'range'
          1        SEND_VAL                                                 0
          2        SEND_VAL                                                 10000
          3        DO_ICALL                                         $2      
          4        ASSIGN                                                   !0, $2
    5     5        INIT_FCALL                                               'microtime'
          6        SEND_VAL                                                 <true>
          7        DO_ICALL                                         $4      
          8        ASSIGN                                                   !1, $4
    6     9        INIT_FCALL                                               'md5'
         10        INIT_FCALL                                               'serialize'
         11        SEND_VAR                                                 !0
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
    7    15        INIT_FCALL                                               'microtime'
         16        SEND_VAL                                                 <true>
         17        DO_ICALL                                         $8      
         18        SUB                                              ~9      $8, !1
         19        CONCAT                                           ~10     'md5%28serialize..%3A', ~9
         20        CONCAT                                           ~11     ~10, '%0A'
         21        ECHO                                                     ~11
    9    22        INIT_FCALL                                               'microtime'
         23        SEND_VAL                                                 <true>
         24        DO_ICALL                                         $12     
         25        ASSIGN                                                   !1, $12
   10    26        INIT_FCALL                                               'md5'
         27        INIT_FCALL                                               'json_encode'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $14     
         30        SEND_VAR                                                 $14
         31        DO_ICALL                                                 
   11    32        INIT_FCALL                                               'microtime'
         33        SEND_VAL                                                 <true>
         34        DO_ICALL                                         $16     
         35        SUB                                              ~17     $16, !1
         36        CONCAT                                           ~18     'md5%28json_encode..%3A', ~17
         37        CONCAT                                           ~19     ~18, '%0A'
         38        ECHO                                                     ~19
         39      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.61 ms | 1396 KiB | 23 Q