3v4l.org

run code in 300+ PHP versions simultaneously
<?php class A { function __construct($i){ if ($i > 10) { throw new Exception("valor maior que 10"); } } } try { $a = new A(50); if (!is_null($a)) { echo $a; } } catch(Exception $e) { if (!is_null($a)) { echo $a; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
Found catch point at position: 9
Branch analysis from position: 9
2 jumps found. (Code = 107) Position 1 = 10, Position 2 = -2
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 14
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
filename:       /in/jPAJI
function name:  (null)
number of ops:  15
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   NEW                                              $2      'A'
          1        SEND_VAL_EX                                              50
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   16     4        TYPE_CHECK                                    2  ~5      !0
          5        BOOL_NOT                                         ~6      ~5
          6      > JMPZ                                                     ~6, ->8
   17     7    >   ECHO                                                     !0
          8    > > JMP                                                      ->14
   19     9  E > > CATCH                                       last         'Exception'
   20    10    >   TYPE_CHECK                                    2  ~7      !0
         11        BOOL_NOT                                         ~8      ~7
         12      > JMPZ                                                     ~8, ->14
   21    13    >   ECHO                                                     !0
   24    14    > > RETURN                                                   1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 3, Position 2 = 7
Branch analysis from position: 3
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/jPAJI
function name:  __construct
number of ops:  8
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    6     1        IS_SMALLER                                               10, !0
          2      > JMPZ                                                     ~1, ->7
    7     3    >   NEW                                              $2      'Exception'
          4        SEND_VAL_EX                                              'valor+maior+que+10'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $2
    9     7    > > RETURN                                                   null

End of function __construct

End of class A.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.79 ms | 1395 KiB | 13 Q