3v4l.org

run code in 300+ PHP versions simultaneously
<?php function test() { $data = str_repeat('.', 1000000); echo strlen(serialize($data)); //echo strlen(serialize(str_repeat('.', 1000000))); //$data = serialize(str_repeat('.', 1000000)); //echo strlen($data); } test(); echo PHP_EOL, memory_get_peak_usage(), PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kdvqj
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   13     0  E >   INIT_FCALL                                               'test'
          1        DO_FCALL                                      0          
   14     2        ECHO                                                     '%0A'
          3        INIT_FCALL                                               'memory_get_peak_usage'
          4        DO_ICALL                                         $1      
          5        ECHO                                                     $1
          6        ECHO                                                     '%0A'
          7      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kdvqj
function name:  test
number of ops:  11
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_FCALL                                               'str_repeat'
          1        SEND_VAL                                                 '.'
          2        SEND_VAL                                                 1000000
          3        DO_ICALL                                         $1      
          4        ASSIGN                                                   !0, $1
    5     5        INIT_FCALL                                               'serialize'
          6        SEND_VAR                                                 !0
          7        DO_ICALL                                         $3      
          8        STRLEN                                           ~4      $3
          9        ECHO                                                     ~4
   11    10      > RETURN                                                   null

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.93 ms | 1389 KiB | 20 Q