3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HttpStatus { const CODE_200 = 200; public static function isValid($statusCode) { $const = get_class(self) . '::CODE_' . $statusCode; var_dump(defined($const)); } } HttpStatus::isValid(200);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T3W0k
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_STATIC_METHOD_CALL                                  'HttpStatus', 'isValid'
          1        SEND_VAL                                                 200
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Class HttpStatus:
Function isvalid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/T3W0k
function name:  isValid
number of ops:  13
compiled vars:  !0 = $statusCode, !1 = $const
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        FETCH_CONSTANT                                   ~2      'self'
          2        GET_CLASS                                        ~3      ~2
          3        CONCAT                                           ~4      ~3, '%3A%3ACODE_'
          4        CONCAT                                           ~5      ~4, !0
          5        ASSIGN                                                   !1, ~5
    7     6        INIT_FCALL                                               'var_dump'
          7        INIT_FCALL                                               'defined'
          8        SEND_VAR                                                 !1
          9        DO_ICALL                                         $7      
         10        SEND_VAR                                                 $7
         11        DO_ICALL                                                 
    8    12      > RETURN                                                   null

End of function isvalid

End of class HttpStatus.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.42 ms | 1395 KiB | 17 Q