3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Test; class Test { private $s; private $i; public function __construct(string $s, int $i) { assert($i > 3000); $this->s = $s; $this->i = $i; } public function foo() { return 's: ' . $this->s . ', i: ' . $this->i; } } try { $a = new Test('Hello, world!', 2015); echo $a->foo(); } catch (\Throwable $e) { echo $e; }
Finding entry points
Branch analysis from position: 0
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/8uj3j
function name:  (null)
number of ops:  12
compiled vars:  !0 = $a, !1 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   NEW                                              $2      'Test%5CTest'
          1        SEND_VAL_EX                                              'Hello%2C+world%21'
          2        SEND_VAL_EX                                              2015
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   24     5        INIT_METHOD_CALL                                         !0, 'foo'
          6        DO_FCALL                                      0  $5      
          7        ECHO                                                     $5
          8      > JMP                                                      ->11
   25     9  E > > CATCH                                       last         'Throwable'
   26    10    >   ECHO                                                     !1
   27    11    > > RETURN                                                   1

Class Test\Test:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8uj3j
function name:  __construct
number of ops:  13
compiled vars:  !0 = $s, !1 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   11     2        ASSERT_CHECK                                             
          3        INIT_NS_FCALL_BY_NAME                                    'Test%5Cassert'
          4        IS_SMALLER                                       ~2      3000, !1
          5        SEND_VAL_EX                                              ~2
          6        SEND_VAL_EX                                              'assert%28%24i+%3E+3000%29'
          7        DO_FCALL                                      0          
   12     8        ASSIGN_OBJ                                               's'
          9        OP_DATA                                                  !0
   13    10        ASSIGN_OBJ                                               'i'
         11        OP_DATA                                                  !1
   14    12      > RETURN                                                   null

End of function __construct

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/8uj3j
function name:  foo
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   FETCH_OBJ_R                                      ~0      's'
          1        CONCAT                                           ~1      's%3A+', ~0
          2        CONCAT                                           ~2      ~1, '%2C+i%3A+'
          3        FETCH_OBJ_R                                      ~3      'i'
          4        CONCAT                                           ~4      ~2, ~3
          5      > RETURN                                                   ~4
   19     6*     > RETURN                                                   null

End of function foo

End of class Test\Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.5 ms | 1400 KiB | 15 Q