3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = null; try { if(null === $string) { throw new InvalidArgumentException("Contrat distant non trouvé"); } $string = "coucou"; } catch (InvalidArgumentException $e) { $string = "exception"; } echo $string;
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 = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
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
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/49G1o
function name:  (null)
number of ops:  13
compiled vars:  !0 = $string, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, null
    5     1        TYPE_CHECK                                    2          !0
          2      > JMPZ                                                     ~3, ->7
    6     3    >   NEW                                              $4      'InvalidArgumentException'
          4        SEND_VAL_EX                                              'Contrat+distant+non+trouv%C3%A9'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $4
    8     7    >   ASSIGN                                                   !0, 'coucou'
          8      > JMP                                                      ->11
    9     9  E > > CATCH                                       last         'InvalidArgumentException'
   10    10    >   ASSIGN                                                   !0, 'exception'
   12    11    >   ECHO                                                     !0
         12      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.99 ms | 1393 KiB | 13 Q