3v4l.org

run code in 300+ PHP versions simultaneously
<?php $res = 'https://site.domian/path/fail'; $resl = end(explode('/', $res))=="fail"?true:false; var_dump($resl);
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/CqEc2
function name:  (null)
number of ops:  18
compiled vars:  !0 = $res, !1 = $resl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 'https%3A%2F%2Fsite.domian%2Fpath%2Ffail'
    4     1        INIT_FCALL                                               'end'
          2        INIT_FCALL                                               'explode'
          3        SEND_VAL                                                 '%2F'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $3      
          6        SEND_VAR_NO_REF                               0          $3
          7        DO_ICALL                                         $4      
          8        IS_EQUAL                                                 $4, 'fail'
          9      > JMPZ                                                     ~5, ->12
         10    >   QM_ASSIGN                                        ~6      <true>
         11      > JMP                                                      ->13
         12    >   QM_ASSIGN                                        ~6      <false>
         13    >   ASSIGN                                                   !1, ~6
    5    14        INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !1
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.56 ms | 1007 KiB | 16 Q