3v4l.org

run code in 300+ PHP versions simultaneously
<?php function b($t,$s) { echo '[' . $s . ':' .($t ? 'true' : 'false') . ']'; return $t; } b((b(true,1) && b(false,2)) || b(false,3),4); echo "\n"; b((b(true,1) && b(true, 2)) || b(false,3),4); echo "\n"; b((b(false,1) && b(true,2)) || b(false,3),4);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
2 jumps found. (Code = 46) Position 1 = 27, Position 2 = 32
Branch analysis from position: 27
2 jumps found. (Code = 47) Position 1 = 33, Position 2 = 38
Branch analysis from position: 33
2 jumps found. (Code = 46) Position 1 = 48, Position 2 = 53
Branch analysis from position: 48
2 jumps found. (Code = 47) Position 1 = 54, Position 2 = 59
Branch analysis from position: 54
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 59
Branch analysis from position: 53
Branch analysis from position: 38
Branch analysis from position: 32
Branch analysis from position: 17
Branch analysis from position: 11
filename:       /in/SjKDi
function name:  (null)
number of ops:  63
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'b'
          1        INIT_FCALL                                               'b'
          2        SEND_VAL                                                 <true>
          3        SEND_VAL                                                 1
          4        DO_FCALL                                      0  $0      
          5      > JMPZ_EX                                          ~1      $0, ->11
          6    >   INIT_FCALL                                               'b'
          7        SEND_VAL                                                 <false>
          8        SEND_VAL                                                 2
          9        DO_FCALL                                      0  $2      
         10        BOOL                                             ~1      $2
         11    > > JMPNZ_EX                                         ~1      ~1, ->17
         12    >   INIT_FCALL                                               'b'
         13        SEND_VAL                                                 <false>
         14        SEND_VAL                                                 3
         15        DO_FCALL                                      0  $3      
         16        BOOL                                             ~1      $3
         17    >   SEND_VAL                                                 ~1
         18        SEND_VAL                                                 4
         19        DO_FCALL                                      0          
    9    20        ECHO                                                     '%0A'
   10    21        INIT_FCALL                                               'b'
         22        INIT_FCALL                                               'b'
         23        SEND_VAL                                                 <true>
         24        SEND_VAL                                                 1
         25        DO_FCALL                                      0  $5      
         26      > JMPZ_EX                                          ~6      $5, ->32
         27    >   INIT_FCALL                                               'b'
         28        SEND_VAL                                                 <true>
         29        SEND_VAL                                                 2
         30        DO_FCALL                                      0  $7      
         31        BOOL                                             ~6      $7
         32    > > JMPNZ_EX                                         ~6      ~6, ->38
         33    >   INIT_FCALL                                               'b'
         34        SEND_VAL                                                 <false>
         35        SEND_VAL                                                 3
         36        DO_FCALL                                      0  $8      
         37        BOOL                                             ~6      $8
         38    >   SEND_VAL                                                 ~6
         39        SEND_VAL                                                 4
         40        DO_FCALL                                      0          
   11    41        ECHO                                                     '%0A'
   12    42        INIT_FCALL                                               'b'
         43        INIT_FCALL                                               'b'
         44        SEND_VAL                                                 <false>
         45        SEND_VAL                                                 1
         46        DO_FCALL                                      0  $10     
         47      > JMPZ_EX                                          ~11     $10, ->53
         48    >   INIT_FCALL                                               'b'
         49        SEND_VAL                                                 <true>
         50        SEND_VAL                                                 2
         51        DO_FCALL                                      0  $12     
         52        BOOL                                             ~11     $12
         53    > > JMPNZ_EX                                         ~11     ~11, ->59
         54    >   INIT_FCALL                                               'b'
         55        SEND_VAL                                                 <false>
         56        SEND_VAL                                                 3
         57        DO_FCALL                                      0  $13     
         58        BOOL                                             ~11     $13
         59    >   SEND_VAL                                                 ~11
         60        SEND_VAL                                                 4
         61        DO_FCALL                                      0          
         62      > RETURN                                                   1

Function b:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SjKDi
function name:  b
number of ops:  13
compiled vars:  !0 = $t, !1 = $s
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        CONCAT                                           ~2      '%5B', !1
          3        CONCAT                                           ~3      ~2, '%3A'
          4      > JMPZ                                                     !0, ->7
          5    >   QM_ASSIGN                                        ~4      'true'
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~4      'false'
          8    >   CONCAT                                           ~5      ~3, ~4
          9        CONCAT                                           ~6      ~5, '%5D'
         10        ECHO                                                     ~6
    5    11      > RETURN                                                   !0
    6    12*     > RETURN                                                   null

End of function b

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.15 ms | 1403 KiB | 25 Q