3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); function nodefault($a) { echo is_array($a)?'true':'false'; } function hasdefault($a = null) { echo is_array($a)?'true':'false'; } echo is_array($a)?'true':'false'; echo hasdefault($a); echo nodefault($a);
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/MXFPh
function name:  (null)
number of ops:  18
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
   11     3        TYPE_CHECK                                  128          !0
          4      > JMPZ                                                     ~2, ->7
          5    >   QM_ASSIGN                                        ~3      'true'
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~3      'false'
          8    >   ECHO                                                     ~3
   12     9        INIT_FCALL                                               'hasdefault'
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0  $4      
         12        ECHO                                                     $4
   13    13        INIT_FCALL                                               'nodefault'
         14        SEND_VAR                                                 !0
         15        DO_FCALL                                      0  $5      
         16        ECHO                                                     $5
         17      > RETURN                                                   1

Function nodefault:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MXFPh
function name:  nodefault
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~1, ->5
          3    >   QM_ASSIGN                                        ~2      'true'
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      'false'
          6    >   ECHO                                                     ~2
    5     7      > RETURN                                                   null

End of function nodefault

Function hasdefault:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/MXFPh
function name:  hasdefault
number of ops:  8
compiled vars:  !0 = $a
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                        !0      null
    8     1        TYPE_CHECK                                  128          !0
          2      > JMPZ                                                     ~1, ->5
          3    >   QM_ASSIGN                                        ~2      'true'
          4      > JMP                                                      ->6
          5    >   QM_ASSIGN                                        ~2      'false'
          6    >   ECHO                                                     ~2
    9     7      > RETURN                                                   null

End of function hasdefault

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.79 ms | 1403 KiB | 17 Q