3v4l.org

run code in 500+ PHP versions simultaneously
<?php $proposedName = "Illegal Name"; try { eval("class $proposedName {}; new $proposedName();"); } catch (\Throwable $t) { print "Illegal name: ". $t->getMessage(); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
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 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/K3usN
function name:  (null)
number of ops:  14
compiled vars:  !0 = $proposedName, !1 = $t
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                       !0, 'Illegal+Name'
    6     1        ROPE_INIT                                         5  ~4      'class+'
          2        ROPE_ADD                                          1  ~4      ~4, !0
          3        ROPE_ADD                                          2  ~4      ~4, '+%7B%7D%3B+new+'
          4        ROPE_ADD                                          3  ~4      ~4, !0
          5        ROPE_END                                          4  ~3      ~4, '%28%29%3B'
          6        INCLUDE_OR_EVAL                                              ~3, EVAL
          7      > JMP                                                          ->13
    7     8  E > > CATCH                                           last         'Throwable'
    8     9    >   INIT_METHOD_CALL                                             !1, 'getMessage'
         10        DO_FCALL                                          0  $8      
         11        CONCAT                                               ~9      'Illegal+name%3A+', $8
         12        ECHO                                                         ~9
    9    13    > > RETURN                                                       1

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
126.73 ms | 473 KiB | 7 Q