3v4l.org

run code in 300+ PHP versions simultaneously
<?php enum A: string { case b = 'b'; } $a = 'A'; $b = 'b'; var_dump($a::tryFrom($b));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jRsRv
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'a'
    7     1        ASSIGN                                                   !0, 'A'
    8     2        ASSIGN                                                   !1, 'b'
   10     3        INIT_FCALL                                               'var_dump'
          4        FETCH_CLASS                                   0  $4      !0
          5        INIT_STATIC_METHOD_CALL                                  $4, 'tryFrom'
          6        SEND_VAR_EX                                              !1
          7        DO_FCALL                                      0  $5      
          8        SEND_VAR                                                 $5
          9        DO_ICALL                                                 
         10      > RETURN                                                   1

Class A: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.27 ms | 1008 KiB | 14 Q