3v4l.org

run code in 300+ PHP versions simultaneously
<?php function silence(callable $cb, ...$args) { $previous = error_reporting(0); $ret = $cb(...$args); error_reporting($previous); return $ret; } $fp = silence(fn () => fopen("foo.txt", 4096));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v3fOY
function name:  (null)
number of ops:  6
compiled vars:  !0 = $fp
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'silence'
          1        DECLARE_LAMBDA_FUNCTION                          ~1      [0]
          2        SEND_VAL                                                 ~1
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !0, $2
          5      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v3fOY
function name:  {closure}
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
          0  E >   INIT_FCALL                                               'fopen'
          1        SEND_VAL                                                 'foo.txt'
          2        SEND_VAL                                                 4096
          3        DO_ICALL                                         $0      
          4      > RETURN                                                   $0
          5*     > RETURN                                                   null

End of Dynamic Function 0

Function silence:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/v3fOY
function name:  silence
number of ops:  16
compiled vars:  !0 = $cb, !1 = $args, !2 = $previous, !3 = $ret
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV_VARIADIC                                    !1      
    6     2        INIT_FCALL                                               'error_reporting'
          3        SEND_VAL                                                 0
          4        DO_ICALL                                         $4      
          5        ASSIGN                                                   !2, $4
    7     6        INIT_DYNAMIC_CALL                                        !0
          7        SEND_UNPACK                                              !1
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      1  $6      
         10        ASSIGN                                                   !3, $6
    8    11        INIT_FCALL                                               'error_reporting'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
    9    14      > RETURN                                                   !3
   10    15*     > RETURN                                                   null

End of function silence

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.82 ms | 1004 KiB | 16 Q