3v4l.org

run code in 300+ PHP versions simultaneously
<?php //version 1 $a = [1, 2, 3]; $b = 4; $a += [$b]; print_r($a); //output: Array ( [0] => 1 [1] => 2 [2] => 3 ) //version 2 $c = [1, 2, 3]; $d = 4; if(!in_array($d, $c)) $c[] = $d; print_r($c); //output: Array ( [0] => 1 [1] => 2 [2] => 3 )
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/GVfgf
function name:  (null)
number of ops:  21
compiled vars:  !0 = $a, !1 = $b, !2 = $c, !3 = $d
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, 4
    6     2        INIT_ARRAY                                       ~6      !1
          3        ASSIGN_OP                                     1          !0, ~6
    8     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   12     7        ASSIGN                                                   !2, <array>
   13     8        ASSIGN                                                   !3, 4
   14     9        INIT_FCALL                                               'in_array'
         10        SEND_VAR                                                 !3
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $11     
         13        BOOL_NOT                                         ~12     $11
         14      > JMPZ                                                     ~12, ->17
   15    15    >   ASSIGN_DIM                                               !2
         16        OP_DATA                                                  !3
   17    17    >   INIT_FCALL                                               'print_r'
         18        SEND_VAR                                                 !2
         19        DO_ICALL                                                 
   18    20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
141.92 ms | 1395 KiB | 17 Q