3v4l.org

run code in 300+ PHP versions simultaneously
<?php $mem = memory_get_usage(); $a = array_fill( 0, 131072, 0 ); $mema = memory_get_usage() - $mem; $b = 1 ? $a : 0; $memb = memory_get_usage() - $mem; printf( '%1.1f', $memb / $mema );
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8k1sL
function name:  (null)
number of ops:  28
compiled vars:  !0 = $mem, !1 = $a, !2 = $mema, !3 = $b, !4 = $memb
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'memory_get_usage'
          1        DO_ICALL                                         $5      
          2        ASSIGN                                                   !0, $5
    4     3        INIT_FCALL                                               'array_fill'
          4        SEND_VAL                                                 0
          5        SEND_VAL                                                 131072
          6        SEND_VAL                                                 0
          7        DO_ICALL                                         $7      
          8        ASSIGN                                                   !1, $7
    5     9        INIT_FCALL                                               'memory_get_usage'
         10        DO_ICALL                                         $9      
         11        SUB                                              ~10     $9, !0
         12        ASSIGN                                                   !2, ~10
    6    13      > JMPZ                                                     1, ->16
         14    >   QM_ASSIGN                                        ~12     !1
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~12     0
         17    >   ASSIGN                                                   !3, ~12
    7    18        INIT_FCALL                                               'memory_get_usage'
         19        DO_ICALL                                         $14     
         20        SUB                                              ~15     $14, !0
         21        ASSIGN                                                   !4, ~15
    9    22        INIT_FCALL                                               'printf'
         23        SEND_VAL                                                 '%251.1f'
         24        DIV                                              ~17     !4, !2
         25        SEND_VAL                                                 ~17
         26        DO_ICALL                                                 
         27      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.6 ms | 1395 KiB | 19 Q