3v4l.org

run code in 300+ PHP versions simultaneously
<?php function checkArray($sourceValue) { $createdArray = (array) $sourceValue; var_export($sourceValue); var_export($createdArray); var_export(empty($createdAray)); } checkArray(null); checkArray(false); checkArray(''); checkArray($undefined);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ARaC4
function name:  (null)
number of ops:  13
compiled vars:  !0 = $undefined
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'checkarray'
          1        SEND_VAL                                                 null
          2        DO_FCALL                                      0          
          3        INIT_FCALL                                               'checkarray'
          4        SEND_VAL                                                 <false>
          5        DO_FCALL                                      0          
          6        INIT_FCALL                                               'checkarray'
          7        SEND_VAL                                                 ''
          8        DO_FCALL                                      0          
          9        INIT_FCALL                                               'checkarray'
         10        SEND_VAR                                                 !0
         11        DO_FCALL                                      0          
         12      > RETURN                                                   1

Function checkarray:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ARaC4
function name:  checkArray
number of ops:  14
compiled vars:  !0 = $sourceValue, !1 = $createdArray, !2 = $createdAray
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   RECV                                             !0      
          1        CAST                                          7  ~3      !0
          2        ASSIGN                                                   !1, ~3
          3        INIT_FCALL                                               'var_export'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                                 
          6        INIT_FCALL                                               'var_export'
          7        SEND_VAR                                                 !1
          8        DO_ICALL                                                 
          9        INIT_FCALL                                               'var_export'
         10        ISSET_ISEMPTY_CV                                 ~7      !2
         11        SEND_VAL                                                 ~7
         12        DO_ICALL                                                 
         13      > RETURN                                                   null

End of function checkarray

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.73 ms | 1398 KiB | 19 Q