3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allowed = ["banana", "apple", "strawberry"]; $goodarray = ["banana", "strawberry"]; $badarray = ["apple", "mango"]; echo "good array errors"; var_dump(array_diff($goodarray, $allowed)); echo "\n"; echo "bad array errors"; var_dump(array_diff($badarray, $allowed));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nTE7p
function name:  (null)
number of ops:  21
compiled vars:  !0 = $allowed, !1 = $goodarray, !2 = $badarray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   ASSIGN                                                   !0, <array>
    5     1        ASSIGN                                                   !1, <array>
    6     2        ASSIGN                                                   !2, <array>
    8     3        ECHO                                                     'good+array+errors'
    9     4        INIT_FCALL                                               'var_dump'
          5        INIT_FCALL                                               'array_diff'
          6        SEND_VAR                                                 !1
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                         $6      
          9        SEND_VAR                                                 $6
         10        DO_ICALL                                                 
   10    11        ECHO                                                     '%0A'
   12    12        ECHO                                                     'bad+array+errors'
   13    13        INIT_FCALL                                               'var_dump'
         14        INIT_FCALL                                               'array_diff'
         15        SEND_VAR                                                 !2
         16        SEND_VAR                                                 !0
         17        DO_ICALL                                         $8      
         18        SEND_VAR                                                 $8
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.02 ms | 1395 KiB | 17 Q