3v4l.org

run code in 500+ PHP versions simultaneously
<?php $reporting = error_reporting(E_ERROR | E_COMPILE_ERROR); $result = false; try { $result = eval('function(?int $a){};return true;'); } catch (Throwable $e) { } catch (Exception $e) { // ignore } error_reporting($reporting); $isSupported = true === $result; var_dump($isSupported);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Found catch point at position: 8
Branch analysis from position: 8
2 jumps found. (Code = 107) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 10
2 jumps found. (Code = 107) Position 1 = 11, Position 2 = -2
Branch analysis from position: 11
Found catch point at position: 10
Branch analysis from position: 10
filename:       /in/PbcYV
function name:  (null)
number of ops:  20
compiled vars:  !0 = $reporting, !1 = $result, !2 = $e, !3 = $isSupported
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                                   'error_reporting'
          1        SEND_VAL                                                     65
          2        DO_ICALL                                             $4      
          3        ASSIGN                                                       !0, $4
    4     4        ASSIGN                                                       !1, <false>
    7     5        INCLUDE_OR_EVAL                                      $7      'function%28%3Fint+%24a%29%7B%7D%3Breturn+true%3B', EVAL
          6        ASSIGN                                                       !1, $7
          7      > JMP                                                          ->11
    8     8  E > > CATCH                                                        'Throwable', ->10
          9    > > JMP                                                          ->11
    9    10  E > > CATCH                                           last         'Exception'
   13    11    >   INIT_FCALL                                                   'error_reporting'
         12        SEND_VAR                                                     !0
         13        DO_ICALL                                                     
   14    14        TYPE_CHECK                                        8  ~10     !1
         15        ASSIGN                                                       !3, ~10
   16    16        INIT_FCALL                                                   'var_dump'
         17        SEND_VAR                                                     !3
         18        DO_ICALL                                                     
         19      > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
160.89 ms | 2245 KiB | 15 Q