3v4l.org

run code in 300+ PHP versions simultaneously
<?php $test = trim("asdf "); $test2 = trim(" "); $echeck = (empty($test)) ? "error" : $test; $echeck2 = (empty($test2)) ? "error" : "opala"; echo $echeck . "\n" . $echeck2; exit(); ?>
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
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
Branch analysis from position: 18
filename:       /in/lag7v
function name:  (null)
number of ops:  25
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        INIT_FCALL                                               'trim'
          5        SEND_VAL                                                 '+'
          6        DO_ICALL                                         $6      
          7        ASSIGN                                                   !1, $6
    5     8        ISSET_ISEMPTY_CV                                         !0
          9      > JMPZ                                                     ~8, ->12
         10    >   QM_ASSIGN                                        ~9      'error'
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~9      !0
         13    >   ASSIGN                                                   !2, ~9
    6    14        ISSET_ISEMPTY_CV                                         !1
         15      > JMPZ                                                     ~11, ->18
         16    >   QM_ASSIGN                                        ~12     'error'
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~12     'opala'
         19    >   ASSIGN                                                   !3, ~12
    8    20        CONCAT                                           ~14     !2, '%0A'
         21        CONCAT                                           ~15     ~14, !3
         22        ECHO                                                     ~15
    9    23      > EXIT                                                     
   11    24*     > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
302.23 ms | 1010 KiB | 14 Q