3v4l.org

run code in 500+ 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:  23
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                                                     
   15     6        ASSIGN                                                       !0, <array>
   19     7        NEW                                                  $6      'stdClass'
          8        DO_FCALL                                          0          
          9        INIT_ARRAY                                           ~8      $6, 'id'
   20    10        ADD_ARRAY_ELEMENT                                    ~8      'foo', 'foo'
   21    11        ADD_ARRAY_ELEMENT                                    ~8      'bar', 'bar'
   18    12        ASSIGN                                                       !1, ~8
   23    13        INIT_FCALL                                                   'array_diff'
         14        SEND_VAR                                                     !0
         15        SEND_VAR                                                     !1
         16        DO_ICALL                                             $10     
         17        IS_NOT_IDENTICAL                                     ~11     $10, <array>
         18        ASSIGN                                                       !2, ~11
   24    19        INIT_FCALL                                                   'var_dump'
         20        SEND_VAR                                                     !2
         21        DO_ICALL                                                     
         22      > 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.5.0


preferences:
177.44 ms | 2615 KiB | 18 Q