3v4l.org

run code in 300+ PHP versions simultaneously
<?php $constants = get_defined_constants(true); $json_errors = array(); foreach ($constants["json"] as $name => $value) { if (!strncmp($name, "JSON_ERROR_", 11)) { $json_errors[$value] = $name; } } var_dump($json_errors);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 7, Position 2 = 19
Branch analysis from position: 7
2 jumps found. (Code = 78) Position 1 = 8, Position 2 = 19
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 16, Position 2 = 18
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 18
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
filename:       /in/8Rjd1
function name:  (null)
number of ops:  24
compiled vars:  !0 = $constants, !1 = $json_errors, !2 = $value, !3 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'get_defined_constants'
          1        SEND_VAL                                                 <true>
          2        DO_ICALL                                         $4      
          3        ASSIGN                                                   !0, $4
    3     4        ASSIGN                                                   !1, <array>
    4     5        FETCH_DIM_R                                      ~7      !0, 'json'
          6      > FE_RESET_R                                       $8      ~7, ->19
          7    > > FE_FETCH_R                                       ~9      $8, !2, ->19
          8    >   ASSIGN                                                   !3, ~9
    5     9        INIT_FCALL                                               'strncmp'
         10        SEND_VAR                                                 !3
         11        SEND_VAL                                                 'JSON_ERROR_'
         12        SEND_VAL                                                 11
         13        DO_ICALL                                         $11     
         14        BOOL_NOT                                         ~12     $11
         15      > JMPZ                                                     ~12, ->18
    6    16    >   ASSIGN_DIM                                               !1, !2
         17        OP_DATA                                                  !3
    4    18    > > JMP                                                      ->7
         19    >   FE_FREE                                                  $8
   10    20        INIT_FCALL                                               'var_dump'
         21        SEND_VAR                                                 !1
         22        DO_ICALL                                                 
         23      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.48 ms | 1395 KiB | 19 Q