3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr1 = array(); $arr2 = array(1,2); if (count($arr1)) { echo 'failure'; } if (!count($arr2)) { echo 'success'; } if (!count($arr1)) { echo 'hard fail'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 9
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 13
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
Branch analysis from position: 9
Branch analysis from position: 5
filename:       /in/lQkS3
function name:  (null)
number of ops:  14
compiled vars:  !0 = $arr1, !1 = $arr2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
    3     1        ASSIGN                                                   !1, <array>
    5     2        COUNT                                            ~4      !0
          3      > JMPZ                                                     ~4, ->5
    6     4    >   ECHO                                                     'failure'
    8     5    >   COUNT                                            ~5      !1
          6        BOOL_NOT                                         ~6      ~5
          7      > JMPZ                                                     ~6, ->9
    9     8    >   ECHO                                                     'success'
   11     9    >   COUNT                                            ~7      !0
         10        BOOL_NOT                                         ~8      ~7
         11      > JMPZ                                                     ~8, ->13
   12    12    >   ECHO                                                     'hard+fail'
   13    13    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.32 ms | 1393 KiB | 13 Q