3v4l.org

run code in 500+ PHP versions simultaneously
<?php final class A { private int $value; public function __construct(int $value) { $this->value = $value; } public function getValue(): int { return $this->value; } } $a = new A(100); echo $a->getValue() . PHP_EOL; $a->__construct(200); echo $a->getValue() . PHP_EOL;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p9fK2
function name:  (null)
number of ops:  16
compiled vars:  !0 = $a
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   17     0  E >   NEW                                                  $1      'A'
          1        SEND_VAL_EX                                                  100
          2        DO_FCALL                                          0          
          3        ASSIGN                                                       !0, $1
   18     4        INIT_METHOD_CALL                                             !0, 'getValue'
          5        DO_FCALL                                          0  $4      
          6        CONCAT                                               ~5      $4, '%0A'
          7        ECHO                                                         ~5
   19     8        INIT_METHOD_CALL                                             !0, '__construct'
          9        SEND_VAL_EX                                                  200
         10        DO_FCALL                                          0          
   20    11        INIT_METHOD_CALL                                             !0, 'getValue'
         12        DO_FCALL                                          0  $7      
         13        CONCAT                                               ~8      $7, '%0A'
         14        ECHO                                                         ~8
   21    15      > RETURN                                                       1

Class A:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p9fK2
function name:  __construct
number of ops:  4
compiled vars:  !0 = $value
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   RECV                                                 !0      
    8     1        ASSIGN_OBJ                                                   'value'
          2        OP_DATA                                                      !0
    9     3      > RETURN                                                       null

End of function __construct

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/p9fK2
function name:  getValue
number of ops:  5
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   13     0  E >   FETCH_OBJ_R                                          ~0      'value'
          1        VERIFY_RETURN_TYPE                                           ~0
          2      > RETURN                                                       ~0
   14     3*       VERIFY_RETURN_TYPE                                           
          4*     > RETURN                                                       null

End of function getvalue

End of class A.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
137.98 ms | 2140 KiB | 13 Q