3v4l.org

run code in 300+ PHP versions simultaneously
<?php class πŸš—πŸ­ { private πŸš— $πŸš—; public function __construct() { $this->πŸš— = new πŸš—(); } public function withπŸͺ‘(): self { $this->πŸš—->πŸͺ‘ = true; return $this; } public function build(): πŸš— { return clone $this->πŸš—; } } class πŸš— { public bool $πŸͺ‘ = false; public function getInfo(): string { return $this->πŸͺ‘ ? 'this car with chair' : 'this car without chair' ; } } $πŸš—πŸ­ = new πŸš—πŸ­(); $πŸš— = $πŸš—πŸ­->build(); var_dump($πŸš—->getInfo()); $πŸš— = $πŸš—πŸ­->withπŸͺ‘()->build(); var_dump($πŸš—->getInfo());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlplY
function name:  (null)
number of ops:  22
compiled vars:  !0 = $πŸš—πŸ­, !1 = $πŸš—
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   38     0  E >   NEW                                              $2      '%F0%9F%9A%97%F0%9F%8F%AD'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   40     3        INIT_METHOD_CALL                                         !0, 'build'
          4        DO_FCALL                                      0  $5      
          5        ASSIGN                                                   !1, $5
   41     6        INIT_FCALL                                               'var_dump'
          7        INIT_METHOD_CALL                                         !1, 'getInfo'
          8        DO_FCALL                                      0  $7      
          9        SEND_VAR                                                 $7
         10        DO_ICALL                                                 
   43    11        INIT_METHOD_CALL                                         !0, 'with%F0%9F%AA%91'
         12        DO_FCALL                                      0  $9      
         13        INIT_METHOD_CALL                                         $9, 'build'
         14        DO_FCALL                                      0  $10     
         15        ASSIGN                                                   !1, $10
   44    16        INIT_FCALL                                               'var_dump'
         17        INIT_METHOD_CALL                                         !1, 'getInfo'
         18        DO_FCALL                                      0  $12     
         19        SEND_VAR                                                 $12
         20        DO_ICALL                                                 
         21      > RETURN                                                   1

Class πŸš—πŸ­:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlplY
function name:  __construct
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      '%F0%9F%9A%97'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               '%F0%9F%9A%97'
          3        OP_DATA                                                  $1
   10     4      > RETURN                                                   null

End of function __construct

Function with%F0%9F%AA%91:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlplY
function name:  withπŸͺ‘
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_W                                      $0      '%F0%9F%9A%97'
          1        ASSIGN_OBJ                                               $0, '%F0%9F%AA%91'
          2        OP_DATA                                                  <true>
   16     3        FETCH_THIS                                       ~2      
          4        VERIFY_RETURN_TYPE                                       ~2
          5      > RETURN                                                   ~2
   17     6*       VERIFY_RETURN_TYPE                                       
          7*     > RETURN                                                   null

End of function with%F0%9F%AA%91

Function build:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlplY
function name:  build
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   FETCH_OBJ_R                                      ~0      '%F0%9F%9A%97'
          1        CLONE                                            ~1      ~0
          2        VERIFY_RETURN_TYPE                                       ~1
          3      > RETURN                                                   ~1
   22     4*       VERIFY_RETURN_TYPE                                       
          5*     > RETURN                                                   null

End of function build

End of class πŸš—πŸ­.

Class πŸš—:
Function getinfo:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/vlplY
function name:  getInfo
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   31     0  E >   FETCH_OBJ_R                                      ~0      '%F0%9F%AA%91'
          1      > JMPZ                                                     ~0, ->4
   32     2    >   QM_ASSIGN                                        ~1      'this+car+with+chair'
          3      > JMP                                                      ->5
   33     4    >   QM_ASSIGN                                        ~1      'this+car+without+chair'
          5    >   VERIFY_RETURN_TYPE                                       ~1
          6      > RETURN                                                   ~1
   35     7*       VERIFY_RETURN_TYPE                                       
          8*     > RETURN                                                   null

End of function getinfo

End of class πŸš—.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.16 ms | 1002 KiB | 14 Q