3v4l.org

run code in 500+ PHP versions simultaneously
<?php $string = ' 0 '; $x = str_replace(' ', '', $string) != ''; $y = trim($string) != ''; $z = trim($string) ? true : false; $z1 = empty(trim($string)); var_dump([$x, $y, $z, $z1]);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/7LM6I
function name:  (null)
number of ops:  25
compiled vars:  !0 = $string, !1 = $x, !2 = $y, !3 = $z, !4 = $z1
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, '+0%0A'
    6     1        FRAMELESS_ICALL_3                str_replace         ~6      '+', ''
          2        OP_DATA                                                      !0
          3        IS_NOT_EQUAL                                         ~7      ~6, ''
          4        ASSIGN                                                       !1, ~7
    7     5        FRAMELESS_ICALL_1                trim                ~9      !0
          6        IS_NOT_EQUAL                                         ~10     ~9, ''
          7        ASSIGN                                                       !2, ~10
    8     8        FRAMELESS_ICALL_1                trim                ~12     !0
          9      > JMPZ                                                         ~12, ->12
         10    >   QM_ASSIGN                                            ~13     <true>
         11      > JMP                                                          ->13
         12    >   QM_ASSIGN                                            ~13     <false>
         13    >   ASSIGN                                                       !3, ~13
    9    14        FRAMELESS_ICALL_1                trim                ~15     !0
         15        BOOL_NOT                                             ~16     ~15
         16        ASSIGN                                                       !4, ~16
   11    17        INIT_FCALL                                                   'var_dump'
         18        INIT_ARRAY                                           ~18     !1
         19        ADD_ARRAY_ELEMENT                                    ~18     !2
         20        ADD_ARRAY_ELEMENT                                    ~18     !3
         21        ADD_ARRAY_ELEMENT                                    ~18     !4
         22        SEND_VAL                                                     ~18
         23        DO_ICALL                                                     
         24      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
167.87 ms | 1795 KiB | 14 Q