3v4l.org

run code in 500+ PHP versions simultaneously
<?php $isInternalConstantDeprecatedFx = function (string $const) { $isDeprecated = false; $origHandler = set_error_handler(function (int $no, string $message) use (&$isDeprecated): bool { if ($no === E_DEPRECATED /* || $no === E_USER_DEPRECATED */) { $isDeprecated = true; } return true; }); try { constant($const); } finally { if ($origHandler !== null) { set_error_handler($origHandler); } } return $isDeprecated; }; $deprecatedConstants = []; foreach (get_defined_constants(true) as $groupKey => $groupConstants) { if ($groupKey === 'user') { continue; } foreach ($groupConstants as $k => $v) { if ($isInternalConstantDeprecatedFx($k)) { $deprecatedConstants[] = $k; } } } print_r($deprecatedConstants);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 24
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 24
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 12
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 12
2 jumps found. (Code = 77) Position 1 = 13, Position 2 = 22
Branch analysis from position: 13
2 jumps found. (Code = 78) Position 1 = 14, Position 2 = 22
Branch analysis from position: 14
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 21
Branch analysis from position: 19
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
Branch analysis from position: 21
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 22
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/M1cgh
function name:  (null)
number of ops:  29
compiled vars:  !0 = $isInternalConstantDeprecatedFx, !1 = $deprecatedConstants, !2 = $groupConstants, !3 = $groupKey, !4 = $v, !5 = $k
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                              ~6      [0]
          1        ASSIGN                                                       !0, ~6
   23     2        ASSIGN                                                       !1, <array>
   24     3        INIT_FCALL                                                   'get_defined_constants'
          4        SEND_VAL                                                     <true>
          5        DO_ICALL                                             $9      
          6      > FE_RESET_R                                           $10     $9, ->24
          7    > > FE_FETCH_R                                           ~11     $10, !2, ->24
          8    >   ASSIGN                                                       !3, ~11
   25     9        IS_IDENTICAL                                                 !3, 'user'
         10      > JMPZ                                                         ~13, ->12
   26    11    > > JMP                                                          ->7
   29    12    > > FE_RESET_R                                           $14     !2, ->22
         13    > > FE_FETCH_R                                           ~15     $14, !4, ->22
         14    >   ASSIGN                                                       !5, ~15
   30    15        INIT_DYNAMIC_CALL                                            !0
         16        SEND_VAR_EX                                                  !5
         17        DO_FCALL                                          0  $17     
         18      > JMPZ                                                         $17, ->21
   31    19    >   ASSIGN_DIM                                                   !1
         20        OP_DATA                                                      !5
   29    21    > > JMP                                                          ->13
         22    >   FE_FREE                                                      $14
   24    23      > JMP                                                          ->7
         24    >   FE_FREE                                                      $10
   36    25        INIT_FCALL                                                   'print_r'
         26        SEND_VAR                                                     !1
         27        DO_ICALL                                                     
         28      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 162) Position 1 = 13, Position 2 = 12
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 18
Branch analysis from position: 15
1 jumps found. (Code = 163) Position 1 = -2
Branch analysis from position: 18
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/M1cgh
function name:  {closure:/in/M1cgh:3}
number of ops:  21
compiled vars:  !0 = $const, !1 = $isDeprecated, !2 = $origHandler
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   RECV                                                 !0      
    4     1        ASSIGN                                                       !1, <false>
    5     2        INIT_FCALL                                                   'set_error_handler'
          3        DECLARE_LAMBDA_FUNCTION                              ~4      [0]
          4        BIND_LEXICAL                                                 ~4, !1
   11     5        SEND_VAL                                                     ~4
    5     6        DO_ICALL                                             $5      
          7        ASSIGN                                                       !2, $5
   13     8        INIT_FCALL                                                   'constant'
          9        SEND_VAR                                                     !0
         10        DO_ICALL                                                     
   14    11      > FAST_CALL                                                    ->13
         12    > > JMP                                                          ->19
   15    13    >   TYPE_CHECK                                      1020          !2
         14      > JMPZ                                                         ~9, ->18
   16    15    >   INIT_FCALL                                                   'set_error_handler'
         16        SEND_VAR                                                     !2
         17        DO_ICALL                                                     
         18    > > FAST_RET                                                     
   20    19    > > RETURN                                                       !1
   21    20*     > RETURN                                                       null


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/M1cgh
function name:  {closure:{closure:/in/M1cgh:3}:5}
number of ops:  9
compiled vars:  !0 = $no, !1 = $message, !2 = $isDeprecated
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
          2        BIND_STATIC                                                  !2
    6     3        IS_IDENTICAL                                                 !0, 8192
          4      > JMPZ                                                         ~3, ->6
    7     5    >   ASSIGN                                                       !2, <true>
   10     6    > > RETURN                                                       <true>
   11     7*       VERIFY_RETURN_TYPE                                           
          8*     > RETURN                                                       null

End of Dynamic Function 0

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
129.23 ms | 487 KiB | 11 Q