3v4l.org

run code in 300+ PHP versions simultaneously
<?php $allBills = [0, 0, 1, null]; $bills = array_unique($allBills); if (count($bills) != 1) { $bills = array_filter( $bills, function ($val) { return is_null($val); } ); } print_r($bills);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 14
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/VD1Tj
function name:  (null)
number of ops:  18
compiled vars:  !0 = $allBills, !1 = $bills
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    4     1        INIT_FCALL                                               'array_unique'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $3      
          4        ASSIGN                                                   !1, $3
    5     5        COUNT                                            ~5      !1
          6        IS_NOT_EQUAL                                             ~5, 1
          7      > JMPZ                                                     ~6, ->14
    6     8    >   INIT_FCALL                                               'array_filter'
    7     9        SEND_VAR                                                 !1
    8    10        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVD1Tj%3A8%240'
   10    11        SEND_VAL                                                 ~7
         12        DO_ICALL                                         $8      
    6    13        ASSIGN                                                   !1, $8
   14    14    >   INIT_FCALL                                               'print_r'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FVD1Tj%3A8%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VD1Tj
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
    9     1        TYPE_CHECK                                    2  ~1      !0
          2      > RETURN                                                   ~1
   10     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVD1Tj%3A8%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.75 ms | 1400 KiB | 19 Q