3v4l.org

run code in 500+ PHP versions simultaneously
<?php $results = []; foreach ([ '', 'a', ] as $str) { $strx = var_export($str, true); foreach ([ 0, 5, ] as $num) { $results["$strx ?: $num"] = $str ?: $num; $results["$strx ?: $num ?: false"] = $str ?: $num; $results["($strx ?: $num) ?: false"] = $str ?: $num; $results["$strx ?: ($num ?: false)"] = $str ?: $num; $results["$strx ? ($num ?: false) : false"] = $str ? ($num ?: false) : false; $results["$strx ? $num ?: false : false"] = $str ? $num ?: false : false; } } foreach ($results as $formula => $result) { print var_export($result, true) . ' === ' . $formula . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 69
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 69
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 67
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 67
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 47, Position 2 = 51
Branch analysis from position: 47
1 jumps found. (Code = 42) Position 1 = 52
Branch analysis from position: 52
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 63
Branch analysis from position: 59
1 jumps found. (Code = 42) Position 1 = 64
Branch analysis from position: 64
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 63
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 51
2 jumps found. (Code = 43) Position 1 = 59, Position 2 = 63
Branch analysis from position: 59
Branch analysis from position: 63
Branch analysis from position: 67
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 67
Branch analysis from position: 69
2 jumps found. (Code = 77) Position 1 = 71, Position 2 = 82
Branch analysis from position: 71
2 jumps found. (Code = 78) Position 1 = 72, Position 2 = 82
Branch analysis from position: 72
1 jumps found. (Code = 42) Position 1 = 71
Branch analysis from position: 71
Branch analysis from position: 82
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 82
Branch analysis from position: 69
filename:       /in/q8Al9
function name:  (null)
number of ops:  84
compiled vars:  !0 = $results, !1 = $str, !2 = $strx, !3 = $num, !4 = $result, !5 = $formula
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, <array>
    5     1      > FE_RESET_R                                           $7      <array>, ->69
          2    > > FE_FETCH_R                                                   $7, !1, ->69
    8     3    >   INIT_FCALL                                                   'var_export'
          4        SEND_VAR                                                     !1
          5        SEND_VAL                                                     <true>
          6        DO_ICALL                                             $8      
          7        ASSIGN                                                       !2, $8
   10     8      > FE_RESET_R                                           $10     <array>, ->67
          9    > > FE_FETCH_R                                                   $10, !3, ->67
   13    10    >   ROPE_INIT                                         3  ~12     !2
         11        ROPE_ADD                                          1  ~12     ~12, '+%3F%3A+'
         12        ROPE_END                                          2  ~11     ~12, !3
         13        JMP_SET                                              ~15     !1, ->15
         14        QM_ASSIGN                                            ~15     !3
         15        ASSIGN_DIM                                                   !0, ~11
         16        OP_DATA                                                      ~15
   14    17        ROPE_INIT                                         4  ~17     !2
         18        ROPE_ADD                                          1  ~17     ~17, '+%3F%3A+'
         19        ROPE_ADD                                          2  ~17     ~17, !3
         20        ROPE_END                                          3  ~16     ~17, '+%3F%3A+false'
         21        JMP_SET                                              ~20     !1, ->23
         22        QM_ASSIGN                                            ~20     !3
         23        ASSIGN_DIM                                                   !0, ~16
         24        OP_DATA                                                      ~20
   15    25        ROPE_INIT                                         5  ~22     '%28'
         26        ROPE_ADD                                          1  ~22     ~22, !2
         27        ROPE_ADD                                          2  ~22     ~22, '+%3F%3A+'
         28        ROPE_ADD                                          3  ~22     ~22, !3
         29        ROPE_END                                          4  ~21     ~22, '%29+%3F%3A+false'
         30        JMP_SET                                              ~26     !1, ->32
         31        QM_ASSIGN                                            ~26     !3
         32        ASSIGN_DIM                                                   !0, ~21
         33        OP_DATA                                                      ~26
   16    34        ROPE_INIT                                         4  ~28     !2
         35        ROPE_ADD                                          1  ~28     ~28, '+%3F%3A+%28'
         36        ROPE_ADD                                          2  ~28     ~28, !3
         37        ROPE_END                                          3  ~27     ~28, '+%3F%3A+false%29'
         38        JMP_SET                                              ~31     !1, ->40
         39        QM_ASSIGN                                            ~31     !3
         40        ASSIGN_DIM                                                   !0, ~27
         41        OP_DATA                                                      ~31
   17    42        ROPE_INIT                                         4  ~33     !2
         43        ROPE_ADD                                          1  ~33     ~33, '+%3F+%28'
         44        ROPE_ADD                                          2  ~33     ~33, !3
         45        ROPE_END                                          3  ~32     ~33, '+%3F%3A+false%29+%3A+false'
         46      > JMPZ                                                         !1, ->51
         47    >   JMP_SET                                              ~36     !3, ->49
         48        QM_ASSIGN                                            ~36     <false>
         49        QM_ASSIGN                                            ~37     ~36
         50      > JMP                                                          ->52
         51    >   QM_ASSIGN                                            ~37     <false>
         52    >   ASSIGN_DIM                                                   !0, ~32
         53        OP_DATA                                                      ~37
   18    54        ROPE_INIT                                         4  ~39     !2
         55        ROPE_ADD                                          1  ~39     ~39, '+%3F+'
         56        ROPE_ADD                                          2  ~39     ~39, !3
         57        ROPE_END                                          3  ~38     ~39, '+%3F%3A+false+%3A+false'
         58      > JMPZ                                                         !1, ->63
         59    >   JMP_SET                                              ~42     !3, ->61
         60        QM_ASSIGN                                            ~42     <false>
         61        QM_ASSIGN                                            ~43     ~42
         62      > JMP                                                          ->64
         63    >   QM_ASSIGN                                            ~43     <false>
         64    >   ASSIGN_DIM                                                   !0, ~38
         65        OP_DATA                                                      ~43
   10    66      > JMP                                                          ->9
         67    >   FE_FREE                                                      $10
    5    68      > JMP                                                          ->2
         69    >   FE_FREE                                                      $7
   23    70      > FE_RESET_R                                           $44     !0, ->82
         71    > > FE_FETCH_R                                           ~45     $44, !4, ->82
         72    >   ASSIGN                                                       !5, ~45
   24    73        INIT_FCALL                                                   'var_export'
         74        SEND_VAR                                                     !4
         75        SEND_VAL                                                     <true>
         76        DO_ICALL                                             $47     
         77        CONCAT                                               ~48     $47, '+%3D%3D%3D+'
         78        CONCAT                                               ~49     ~48, !5
         79        CONCAT                                               ~50     ~49, '%0A'
         80        ECHO                                                         ~50
   23    81      > JMP                                                          ->71
         82    >   FE_FREE                                                      $44
   25    83      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
176.81 ms | 2421 KiB | 14 Q