3v4l.org

run code in 500+ PHP versions simultaneously
<?php /* * @link https://github.com/php/php-src/issues/19509 */ ini_set("ignore_repeated_errors", 1); // Suppress repeated identical errors ini_set('error_reporting', 15); // Report errors, warnings & notices (value 15) set_error_handler('discard', ~error_reporting()); // Handler masks reportable errors for($i=0; $i<10; $i++ ) { trim($at); // This will only log one "undefined variable" notice or warning } function discard() { return true; // Handler consumes the error }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 17
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 17
Branch analysis from position: 22
Branch analysis from position: 17
filename:       /in/LOlGj
function name:  (null)
number of ops:  23
compiled vars:  !0 = $i, !1 = $at
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                                   'ini_set'
          1        SEND_VAL                                                     'ignore_repeated_errors'
          2        SEND_VAL                                                     1
          3        DO_ICALL                                                     
    8     4        INIT_FCALL                                                   'ini_set'
          5        SEND_VAL                                                     'error_reporting'
          6        SEND_VAL                                                     15
          7        DO_ICALL                                                     
    9     8        INIT_FCALL                                                   'set_error_handler'
          9        SEND_VAL                                                     'discard'
         10        INIT_FCALL                                                   'error_reporting'
         11        DO_ICALL                                             $4      
         12        BW_NOT                                               ~5      $4
         13        SEND_VAL                                                     ~5
         14        DO_ICALL                                                     
   11    15        ASSIGN                                                       !0, 0
         16      > JMP                                                          ->20
   12    17    >   FRAMELESS_ICALL_1                trim                ~8      !1
         18        FREE                                                         ~8
   11    19        PRE_INC                                                      !0
         20    >   IS_SMALLER                                                   !0, 10
         21      > JMPNZ                                                        ~10, ->17
   17    22    > > RETURN                                                       1

Function discard:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LOlGj
function name:  discard
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                       <true>
   17     1*     > RETURN                                                       null

End of function discard

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.42 ms | 481 KiB | 10 Q