3v4l.org

run code in 300+ PHP versions simultaneously
<?php header('Content-Type: text/plain'); function errorHandler($errno, $errstr, $errfile, $errline) { if ($errno === E_RECOVERABLE_ERROR) { $foo = []; asort($foo); echo $errstr . PHP_EOL; return true; } return false; } set_error_handler('errorHandler'); $key = [ (int) 0 => 'foo' ]; $select = [ 'id' => new stdClass(), 'foo' => 'foo', 'bar' => 'bar' ]; $missingFields = array_diff($key, $select) !== []; var_dump($missingFields);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2nT5M
function name:  (null)
number of ops:  25
compiled vars:  !0 = $key, !1 = $select, !2 = $missingFields
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'header'
          1        SEND_VAL                                                 'Content-Type%3A+text%2Fplain'
          2        DO_ICALL                                                 
   13     3        INIT_FCALL                                               'set_error_handler'
          4        SEND_VAL                                                 'errorHandler'
          5        DO_ICALL                                                 
   16     6        CAST                                          4  ~5      0
          7        INIT_ARRAY                                       ~6      'foo', ~5
   15     8        ASSIGN                                                   !0, ~6
   19     9        NEW                                              $8      'stdClass'
         10        DO_FCALL                                      0          
         11        INIT_ARRAY                                       ~10     $8, 'id'
   20    12        ADD_ARRAY_ELEMENT                                ~10     'foo', 'foo'
   21    13        ADD_ARRAY_ELEMENT                                ~10     'bar', 'bar'
   18    14        ASSIGN                                                   !1, ~10
   23    15        INIT_FCALL                                               'array_diff'
         16        SEND_VAR                                                 !0
         17        SEND_VAR                                                 !1
         18        DO_ICALL                                         $12     
         19        IS_NOT_IDENTICAL                                 ~13     $12, <array>
         20        ASSIGN                                                   !2, ~13
   24    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAR                                                 !2
         23        DO_ICALL                                                 
         24      > RETURN                                                   1

Function errorhandler:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 13
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2nT5M
function name:  errorHandler
number of ops:  15
compiled vars:  !0 = $errno, !1 = $errstr, !2 = $errfile, !3 = $errline, !4 = $foo
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
    5     4        IS_IDENTICAL                                             !0, 4096
          5      > JMPZ                                                     ~5, ->13
    6     6    >   ASSIGN                                                   !4, <array>
    7     7        INIT_FCALL                                               'asort'
          8        SEND_REF                                                 !4
          9        DO_ICALL                                                 
    8    10        CONCAT                                           ~8      !1, '%0A'
         11        ECHO                                                     ~8
    9    12      > RETURN                                                   <true>
   11    13    > > RETURN                                                   <false>
   12    14*     > RETURN                                                   null

End of function errorhandler

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.84 ms | 1007 KiB | 18 Q