3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo memory_get_usage(), PHP_EOL; $s = str_repeat('c', 1000); echo memory_get_usage(), PHP_EOL; $s = (string) $s; echo memory_get_usage(), PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/b2U4O
function name:  (null)
number of ops:  20
compiled vars:  !0 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        DO_ICALL                                         $1      
          2        ECHO                                                     $1
          3        ECHO                                                     '%0A'
    5     4        INIT_FCALL                                               'str_repeat'
          5        SEND_VAL                                                 'c'
          6        SEND_VAL                                                 1000
          7        DO_ICALL                                         $2      
          8        ASSIGN                                                   !0, $2
    7     9        INIT_FCALL                                               'memory_get_usage'
         10        DO_ICALL                                         $4      
         11        ECHO                                                     $4
         12        ECHO                                                     '%0A'
    9    13        CAST                                          6  ~5      !0
         14        ASSIGN                                                   !0, ~5
   11    15        INIT_FCALL                                               'memory_get_usage'
         16        DO_ICALL                                         $7      
         17        ECHO                                                     $7
         18        ECHO                                                     '%0A'
         19      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.14 ms | 1394 KiB | 17 Q