3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = trim("asdf "); $test2 = " "; $echeck = (empty($test)) ? "error" : trim($test); $echeck2 = (empty(trim($test2))) ? "error" : "opala"; echo $echeck . "\n" . $echeck2; exit(); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 21
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
Branch analysis from position: 21
filename:       /in/ik7c0
function name:  (null)
number of ops:  28
compiled vars:  !0 = $test, !1 = $test2, !2 = $echeck, !3 = $echeck2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'trim'
          1        SEND_VAL                                                 'asdf+'
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    4     4        ASSIGN                                                   !1, '+'
    5     5        ISSET_ISEMPTY_CV                                         !0
          6      > JMPZ                                                     ~7, ->9
          7    >   QM_ASSIGN                                        ~8      'error'
          8      > JMP                                                      ->13
          9    >   INIT_FCALL                                               'trim'
         10        SEND_VAR                                                 !0
         11        DO_ICALL                                         $9      
         12        QM_ASSIGN                                        ~8      $9
         13    >   ASSIGN                                                   !2, ~8
    6    14        INIT_FCALL                                               'trim'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                         $11     
         17        BOOL_NOT                                         ~12     $11
         18      > JMPZ                                                     ~12, ->21
         19    >   QM_ASSIGN                                        ~13     'error'
         20      > JMP                                                      ->22
         21    >   QM_ASSIGN                                        ~13     'opala'
         22    >   ASSIGN                                                   !3, ~13
    8    23        CONCAT                                           ~15     !2, '%0A'
         24        CONCAT                                           ~16     ~15, !3
         25        ECHO                                                     ~16
    9    26      > EXIT                                                     
   11    27*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
152.81 ms | 941 KiB | 16 Q