3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.98 ms | 1399 KiB | 17 Q