3v4l.org

run code in 300+ PHP versions simultaneously
<?php $required = array(); if (is_null($required) && is_array($required)) { throw new Exception('The names of required fields must be an array, even if only one field is required.'); } else { echo "The if clause was not run "; } echo is_array($required)?'true':'false';
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 11
Branch analysis from position: 6
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 11
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
filename:       /in/482So
function name:  (null)
number of ops:  19
compiled vars:  !0 = $required
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        TYPE_CHECK                                    2  ~2      !0
          2      > JMPZ_EX                                          ~2      ~2, ->5
          3    >   TYPE_CHECK                                  128  ~3      !0
          4        BOOL                                             ~2      ~3
          5    > > JMPZ                                                     ~2, ->11
          6    >   NEW                                              $4      'Exception'
          7        SEND_VAL_EX                                              'The+names+of+required+fields+must+be+an+array%2C+even+if+only+one+field+is+required.'
          8        DO_FCALL                                      0          
          9      > THROW                                         0          $4
         10*       JMP                                                      ->12
    7    11    >   ECHO                                                     'The+if+clause+was+not+run+'
    9    12        TYPE_CHECK                                  128          !0
         13      > JMPZ                                                     ~6, ->16
         14    >   QM_ASSIGN                                        ~7      'true'
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~7      'false'
         17    >   ECHO                                                     ~7
         18      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.86 ms | 1385 KiB | 13 Q