3v4l.org

run code in 300+ PHP versions simultaneously
<?php function lol($beep) { var_dump(is_bool($beep) ? ($beep ? "true" : "false") : $beep); } lol(true); lol(false); lol(1); lol("test");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZtk4
function name:  (null)
number of ops:  13
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   INIT_FCALL                                               'lol'
          1        SEND_VAL                                                 <true>
          2        DO_FCALL                                      0          
    7     3        INIT_FCALL                                               'lol'
          4        SEND_VAL                                                 <false>
          5        DO_FCALL                                      0          
    8     6        INIT_FCALL                                               'lol'
          7        SEND_VAL                                                 1
          8        DO_FCALL                                      0          
    9     9        INIT_FCALL                                               'lol'
         10        SEND_VAL                                                 'test'
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function lol:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 10
Branch analysis from position: 4
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 = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/cZtk4
function name:  lol
number of ops:  14
compiled vars:  !0 = $beep
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        TYPE_CHECK                                   12          !0
          3      > JMPZ                                                     ~1, ->10
          4    > > JMPZ                                                     !0, ->7
          5    >   QM_ASSIGN                                        ~2      'true'
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~2      'false'
          8    >   QM_ASSIGN                                        ~3      ~2
          9      > JMP                                                      ->11
         10    >   QM_ASSIGN                                        ~3      !0
         11    >   SEND_VAL                                                 ~3
         12        DO_ICALL                                                 
    5    13      > RETURN                                                   null

End of function lol

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.46 ms | 1399 KiB | 19 Q