3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Sett\Specification\Http { interface StatusInterface { public function __construct ( int $code = 200, string $message = '' ); public function getCode () : int; public function getMessage () : string; public function __toString () : string; } } namespace Sett\Implementation\Http { use Sett\Specification\Http\StatusInterface; class Status implements StatusInterface { protected $code = 200; protected $message = ''; public function __construct ( int $code = 200, string $message = '' ) { $this->code = $code; $this->message = $message; } public function getCode () : int { return $this->code; } public function getMessage () : string { return $this->message; } public function __toString () : string { return "{$this->code} {$this->message}"; } } echo new \Sett\Implementation\Http\Status(404, "Not found"); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lknQs
function name:  (null)
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   DECLARE_CLASS                                            'sett%5Cspecification%5Chttp%5Cstatusinterface'
   19     1        DECLARE_CLASS                                            'sett%5Cimplementation%5Chttp%5Cstatus'
   44     2        NEW                                              $0      'Sett%5CImplementation%5CHttp%5CStatus'
          3        SEND_VAL_EX                                              404
          4        SEND_VAL_EX                                              'Not+found'
          5        DO_FCALL                                      0          
          6        ECHO                                                     $0
   45     7      > RETURN                                                   1

Class Sett\Specification\Http\StatusInterface:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lknQs
function name:  __construct
number of ops:  3
compiled vars:  !0 = $code, !1 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      200
          1        RECV_INIT                                        !1      ''
    6     2      > RETURN                                                   null

End of function __construct

Function getcode:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lknQs
function name:  getCode
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function getcode

Function getmessage:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lknQs
function name:  getMessage
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function getmessage

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lknQs
function name:  __toString
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   VERIFY_RETURN_TYPE                                       
          1      > RETURN                                                   null

End of function __tostring

End of class Sett\Specification\Http\StatusInterface.

Class Sett\Implementation\Http\Status:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lknQs
function name:  __construct
number of ops:  7
compiled vars:  !0 = $code, !1 = $message
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   23     0  E >   RECV_INIT                                        !0      200
          1        RECV_INIT                                        !1      ''
   27     2        ASSIGN_OBJ                                               'code'
          3        OP_DATA                                                  !0
   28     4        ASSIGN_OBJ                                               'message'
          5        OP_DATA                                                  !1
   29     6      > RETURN                                                   null

End of function __construct

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

End of function getcode

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

End of function getmessage

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/lknQs
function name:  __toString
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   40     0  E >   FETCH_OBJ_R                                      ~0      'code'
          1        ROPE_INIT                                     3  ~3      ~0
          2        ROPE_ADD                                      1  ~3      ~3, '+'
          3        FETCH_OBJ_R                                      ~1      'message'
          4        ROPE_END                                      2  ~2      ~3, ~1
          5        VERIFY_RETURN_TYPE                                       ~2
          6      > RETURN                                                   ~2
   41     7*       VERIFY_RETURN_TYPE                                       
          8*     > RETURN                                                   null

End of function __tostring

End of class Sett\Implementation\Http\Status.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
223.31 ms | 1399 KiB | 13 Q