3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = false; $quantity = count($items); // default return value 1 with scalars unless var is null if ( $quantity > 0) { echo "Sending you $quantity item(s)"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/ZAaPP
function name:  (null)
number of ops:  10
compiled vars:  !0 = $items, !1 = $quantity
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <false>
    3     1        COUNT                                            ~3      !0
          2        ASSIGN                                                   !1, ~3
    5     3        IS_SMALLER                                               0, !1
          4      > JMPZ                                                     ~5, ->9
    6     5    >   ROPE_INIT                                     3  ~7      'Sending+you+'
          6        ROPE_ADD                                      1  ~7      ~7, !1
          7        ROPE_END                                      2  ~6      ~7, '+item%28s%29'
          8        ECHO                                                     ~6
    7     9    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
163.03 ms | 1392 KiB | 13 Q