3v4l.org

run code in 500+ PHP versions simultaneously
<?php namespace Foo\Bar; function date($format, $timestamp = null) { if ($format == 'Y') { return '2010'; } throw new \Exception("Only Y format is supported"); } echo date('Y');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YBD7Y
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   14     0  E >   INIT_NS_FCALL_BY_NAME                                        'Foo%5CBar%5Cdate'
          1        SEND_VAL_EX                                                  'Y'
          2        DO_FCALL                                          0  $0      
          3        ECHO                                                         $0
          4      > RETURN                                                       1

Function foo%5Cbar%5Cdate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 5
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 5
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/YBD7Y
function name:  Foo\Bar\date
number of ops:  10
compiled vars:  !0 = $format, !1 = $timestamp
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   RECV                                                 !0      
          1        RECV_INIT                                            !1      null
    7     2        IS_EQUAL                                                     !0, 'Y'
          3      > JMPZ                                                         ~2, ->5
    8     4    > > RETURN                                                       '2010'
   11     5    >   NEW                                                  $3      'Exception'
          6        SEND_VAL_EX                                                  'Only+Y+format+is+supported'
          7        DO_FCALL                                          0          
          8      > THROW                                             0          $3
   12     9*     > RETURN                                                       null

End of function foo%5Cbar%5Cdate

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
145.4 ms | 2061 KiB | 14 Q