3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare (strict_types=1); final class Position { private $row; private $column; public function __construct(int $row, int $column) { $this->row = $row; $this->column = $column; } public function is(Position $position) : bool { return $this->row === $position->row && $this->column === $position->column; } } final class Tile { private $position; private $clicked; public function __construct(Position $position) { $this->position = $position; $this->clicked = false; } public static function clicked(Position $position) : self { $tile = new self($position); $tile->clicked = true; return $tile; } public function position() : Position { return $this->position; } public function click() : self { if ($this->isClicked()) { throw new \RuntimeException('Tile can\'t be clicked twice'); } return self::clicked($this->position); } public function isClicked() : bool { return $this->clicked; } } final class Tiles { /** * @var Tile[] */ private $tiles; public function __construct(Tile ...$tiles) { $this->tiles = $tiles; } public function count() : int { return \count($this->tiles); } public function hasMoreThan(Position $position, int $expectedLimit) : bool { return $this->find( function(Tile $tile) use ($position) { return $tile->position()->is($position); } )->count() > $expectedLimit; } public function each(callable $callback) : void { array_map($callback, $this->tiles); } public function find(callable $callback) : Tiles { return new Tiles(...array_filter( $this->tiles, $callback )); } public function map(callable $callback) : array { return array_map($callback, $this->tiles); } public function has(Position $position) : bool { return (bool) $this->find( function(Tile $tile) use ($position) { return $tile->position()->is($position); } )->count(); } public function clickedCount() : int { return (int) array_reduce( $this->tiles, function(int $clicked, Tile $nextTile) { return $nextTile->isClicked() ? $clicked + 1 : $clicked; }, 0 ); } } final class Board { /** * @var Tiles */ private $tiles; public function __construct(Tiles $tiles) { $tiles->each(function(Tile $tile) use ($tiles) { if ($tiles->hasMoreThan($tile->position(), 1)) { throw new \RuntimeException('Board can have only tile at each position'); } }); $this->tiles = $tiles; } public function click(Position $position) : void { if (!$this->tiles->has($position)) { throw new \RuntimeException('Tile does not exists'); } $this->tiles = new Tiles(...$this->tiles->map(function(Tile $tile) use ($position) { return $tile->position()->is($position) ? $tile->click() : $tile; })); } public function score() : int { return $this->tiles->clickedCount(); } } $board = new Board(new Tiles( new Tile(new Position(0, 0)), new Tile(new Position(0, 1)) )); $board->click(new Position(0, 0)); $board->click(new Position(0, 1)); var_dump($board->score());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  (null)
number of ops:  42
compiled vars:  !0 = $board
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  163     0  E >   NEW                                              $1      'Board'
          1        NEW                                              $2      'Tiles'
  164     2        NEW                                              $3      'Tile'
          3        NEW                                              $4      'Position'
          4        SEND_VAL_EX                                              0
          5        SEND_VAL_EX                                              0
          6        DO_FCALL                                      0          
          7        SEND_VAR_NO_REF_EX                                       $4
          8        DO_FCALL                                      0          
          9        SEND_VAR_NO_REF_EX                                       $3
  165    10        NEW                                              $7      'Tile'
         11        NEW                                              $8      'Position'
         12        SEND_VAL_EX                                              0
         13        SEND_VAL_EX                                              1
         14        DO_FCALL                                      0          
         15        SEND_VAR_NO_REF_EX                                       $8
         16        DO_FCALL                                      0          
         17        SEND_VAR_NO_REF_EX                                       $7
         18        DO_FCALL                                      0          
         19        SEND_VAR_NO_REF_EX                                       $2
         20        DO_FCALL                                      0          
  163    21        ASSIGN                                                   !0, $1
  168    22        INIT_METHOD_CALL                                         !0, 'click'
         23        NEW                                              $14     'Position'
         24        SEND_VAL_EX                                              0
         25        SEND_VAL_EX                                              0
         26        DO_FCALL                                      0          
         27        SEND_VAR_NO_REF_EX                                       $14
         28        DO_FCALL                                      0          
  169    29        INIT_METHOD_CALL                                         !0, 'click'
         30        NEW                                              $17     'Position'
         31        SEND_VAL_EX                                              0
         32        SEND_VAL_EX                                              1
         33        DO_FCALL                                      0          
         34        SEND_VAR_NO_REF_EX                                       $17
         35        DO_FCALL                                      0          
  171    36        INIT_FCALL                                               'var_dump'
         37        INIT_METHOD_CALL                                         !0, 'score'
         38        DO_FCALL                                      0  $20     
         39        SEND_VAR                                                 $20
         40        DO_ICALL                                                 
         41      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FVOoEh%3A81%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $tile, !1 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   81     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   82     2        INIT_METHOD_CALL                                         !0, 'position'
          3        DO_FCALL                                      0  $2      
          4        INIT_METHOD_CALL                                         $2, 'is'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $3      
          7      > RETURN                                                   $3
   83     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVOoEh%3A81%240

Function %00%7Bclosure%7D%2Fin%2FVOoEh%3A108%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $tile, !1 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  108     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
  109     2        INIT_METHOD_CALL                                         !0, 'position'
          3        DO_FCALL                                      0  $2      
          4        INIT_METHOD_CALL                                         $2, 'is'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $3      
          7      > RETURN                                                   $3
  110     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVOoEh%3A108%241

Function %00%7Bclosure%7D%2Fin%2FVOoEh%3A118%242:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $clicked, !1 = $nextTile
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  118     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  119     2        INIT_METHOD_CALL                                         !1, 'isClicked'
          3        DO_FCALL                                      0  $2      
          4      > JMPZ                                                     $2, ->8
          5    >   ADD                                              ~3      !0, 1
          6        QM_ASSIGN                                        ~4      ~3
          7      > JMP                                                      ->9
          8    >   QM_ASSIGN                                        ~4      !0
          9    > > RETURN                                                   ~4
  120    10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVOoEh%3A118%242

Function %00%7Bclosure%7D%2Fin%2FVOoEh%3A135%243:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 9, Position 2 = 13
Branch analysis from position: 9
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $tile, !1 = $tiles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  135     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
  136     2        INIT_METHOD_CALL                                         !1, 'hasMoreThan'
          3        INIT_METHOD_CALL                                         !0, 'position'
          4        DO_FCALL                                      0  $2      
          5        SEND_VAR_NO_REF_EX                                       $2
          6        SEND_VAL_EX                                              1
          7        DO_FCALL                                      0  $3      
          8      > JMPZ                                                     $3, ->13
  137     9    >   NEW                                              $4      'RuntimeException'
         10        SEND_VAL_EX                                              'Board+can+have+only+tile+at+each+position'
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $4
  139    13    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVOoEh%3A135%243

Function %00%7Bclosure%7D%2Fin%2FVOoEh%3A150%244:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 13
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $tile, !1 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  150     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
  151     2        INIT_METHOD_CALL                                         !0, 'position'
          3        DO_FCALL                                      0  $2      
          4        INIT_METHOD_CALL                                         $2, 'is'
          5        SEND_VAR_EX                                              !1
          6        DO_FCALL                                      0  $3      
          7      > JMPZ                                                     $3, ->12
  152     8    >   INIT_METHOD_CALL                                         !0, 'click'
          9        DO_FCALL                                      0  $4      
         10        QM_ASSIGN                                        ~5      $4
         11      > JMP                                                      ->13
  153    12    >   QM_ASSIGN                                        ~5      !0
         13    > > RETURN                                                   ~5
  154    14*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FVOoEh%3A150%244

Class Position:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  __construct
number of ops:  7
compiled vars:  !0 = $row, !1 = $column
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   12     2        ASSIGN_OBJ                                               'row'
          3        OP_DATA                                                  !0
   13     4        ASSIGN_OBJ                                               'column'
          5        OP_DATA                                                  !1
   14     6      > RETURN                                                   null

End of function __construct

Function is:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 5, Position 2 = 9
Branch analysis from position: 5
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/VOoEh
function name:  is
number of ops:  13
compiled vars:  !0 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   RECV                                             !0      
   18     1        FETCH_OBJ_R                                      ~1      'row'
          2        FETCH_OBJ_R                                      ~2      !0, 'row'
          3        IS_IDENTICAL                                     ~3      ~1, ~2
          4      > JMPZ_EX                                          ~3      ~3, ->9
          5    >   FETCH_OBJ_R                                      ~4      'column'
          6        FETCH_OBJ_R                                      ~5      !0, 'column'
          7        IS_IDENTICAL                                     ~6      ~4, ~5
          8        BOOL                                             ~3      ~6
          9    >   VERIFY_RETURN_TYPE                                       ~3
         10      > RETURN                                                   ~3
   19    11*       VERIFY_RETURN_TYPE                                       
         12*     > RETURN                                                   null

End of function is

End of class Position.

Class Tile:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  __construct
number of ops:  6
compiled vars:  !0 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   27     0  E >   RECV                                             !0      
   29     1        ASSIGN_OBJ                                               'position'
          2        OP_DATA                                                  !0
   30     3        ASSIGN_OBJ                                               'clicked'
          4        OP_DATA                                                  <false>
   31     5      > RETURN                                                   null

End of function __construct

Function clicked:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  clicked
number of ops:  11
compiled vars:  !0 = $position, !1 = $tile
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   RECV                                             !0      
   35     1        NEW                          self                $2      
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $2
   36     5        ASSIGN_OBJ                                               !1, 'clicked'
          6        OP_DATA                                                  <true>
   38     7        VERIFY_RETURN_TYPE                                       !1
          8      > RETURN                                                   !1
   39     9*       VERIFY_RETURN_TYPE                                       
         10*     > RETURN                                                   null

End of function clicked

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

End of function position

Function click:
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 = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  click
number of ops:  15
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   INIT_METHOD_CALL                                         'isClicked'
          1        DO_FCALL                                      0  $0      
          2      > JMPZ                                                     $0, ->7
   49     3    >   NEW                                              $1      'RuntimeException'
          4        SEND_VAL_EX                                              'Tile+can%27t+be+clicked+twice'
          5        DO_FCALL                                      0          
          6      > THROW                                         0          $1
   52     7    >   INIT_STATIC_METHOD_CALL                                  'clicked'
          8        FETCH_OBJ_R                                      ~3      'position'
          9        SEND_VAL                                                 ~3
         10        DO_FCALL                                      0  $4      
         11        VERIFY_RETURN_TYPE                                       $4
         12      > RETURN                                                   $4
   53    13*       VERIFY_RETURN_TYPE                                       
         14*     > RETURN                                                   null

End of function click

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

End of function isclicked

End of class Tile.

Class Tiles:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  __construct
number of ops:  4
compiled vars:  !0 = $tiles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   68     0  E >   RECV_VARIADIC                                    !0      
   70     1        ASSIGN_OBJ                                               'tiles'
          2        OP_DATA                                                  !0
   71     3      > RETURN                                                   null

End of function __construct

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

End of function count

Function hasmorethan:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  hasMoreThan
number of ops:  14
compiled vars:  !0 = $position, !1 = $expectedLimit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   78     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   80     2        INIT_METHOD_CALL                                         'find'
   81     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVOoEh%3A81%240'
          4        BIND_LEXICAL                                             ~2, !0
   83     5        SEND_VAL_EX                                              ~2
          6        DO_FCALL                                      0  $3      
   84     7        INIT_METHOD_CALL                                         $3, 'count'
          8        DO_FCALL                                      0  $4      
          9        IS_SMALLER                                       ~5      !1, $4
         10        VERIFY_RETURN_TYPE                                       ~5
         11      > RETURN                                                   ~5
   85    12*       VERIFY_RETURN_TYPE                                       
         13*     > RETURN                                                   null

End of function hasmorethan

Function each:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  each
number of ops:  7
compiled vars:  !0 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   87     0  E >   RECV                                             !0      
   89     1        INIT_FCALL                                               'array_map'
          2        SEND_VAR                                                 !0
          3        FETCH_OBJ_R                                      ~1      'tiles'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
   90     6      > RETURN                                                   null

End of function each

Function find:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  find
number of ops:  14
compiled vars:  !0 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   92     0  E >   RECV                                             !0      
   94     1        NEW                                              $1      'Tiles'
          2        INIT_FCALL                                               'array_filter'
   95     3        FETCH_OBJ_R                                      ~2      'tiles'
          4        SEND_VAL                                                 ~2
   96     5        SEND_VAR                                                 !0
          6        DO_ICALL                                         $3      
          7        SEND_UNPACK                                              $3
          8        CHECK_UNDEF_ARGS                                         
          9        DO_FCALL                                      1          
         10        VERIFY_RETURN_TYPE                                       $1
         11      > RETURN                                                   $1
   98    12*       VERIFY_RETURN_TYPE                                       
         13*     > RETURN                                                   null

End of function find

Function map:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  map
number of ops:  10
compiled vars:  !0 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  100     0  E >   RECV                                             !0      
  102     1        INIT_FCALL                                               'array_map'
          2        SEND_VAR                                                 !0
          3        FETCH_OBJ_R                                      ~1      'tiles'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                         $2      
          6        VERIFY_RETURN_TYPE                                       $2
          7      > RETURN                                                   $2
  103     8*       VERIFY_RETURN_TYPE                                       
          9*     > RETURN                                                   null

End of function map

Function has:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  has
number of ops:  13
compiled vars:  !0 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  105     0  E >   RECV                                             !0      
  107     1        INIT_METHOD_CALL                                         'find'
  108     2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVOoEh%3A108%241'
          3        BIND_LEXICAL                                             ~1, !0
  110     4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0  $2      
  111     6        INIT_METHOD_CALL                                         $2, 'count'
          7        DO_FCALL                                      0  $3      
          8        BOOL                                             ~4      $3
          9        VERIFY_RETURN_TYPE                                       ~4
         10      > RETURN                                                   ~4
  112    11*       VERIFY_RETURN_TYPE                                       
         12*     > RETURN                                                   null

End of function has

Function clickedcount:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  clickedCount
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  116     0  E >   INIT_FCALL                                               'array_reduce'
  117     1        FETCH_OBJ_R                                      ~0      'tiles'
          2        SEND_VAL                                                 ~0
  118     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVOoEh%3A118%242'
  120     4        SEND_VAL                                                 ~1
  121     5        SEND_VAL                                                 0
          6        DO_ICALL                                         $2      
          7        CAST                                          4  ~3      $2
          8        VERIFY_RETURN_TYPE                                       ~3
          9      > RETURN                                                   ~3
  123    10*       VERIFY_RETURN_TYPE                                       
         11*     > RETURN                                                   null

End of function clickedcount

End of class Tiles.

Class Board:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  __construct
number of ops:  9
compiled vars:  !0 = $tiles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  133     0  E >   RECV                                             !0      
  135     1        INIT_METHOD_CALL                                         !0, 'each'
          2        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVOoEh%3A135%243'
          3        BIND_LEXICAL                                             ~1, !0
  139     4        SEND_VAL_EX                                              ~1
          5        DO_FCALL                                      0          
  141     6        ASSIGN_OBJ                                               'tiles'
          7        OP_DATA                                                  !0
  142     8      > RETURN                                                   null

End of function __construct

Function click:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 11
Branch analysis from position: 7
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/VOoEh
function name:  click
number of ops:  24
compiled vars:  !0 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  144     0  E >   RECV                                             !0      
  146     1        FETCH_OBJ_R                                      ~1      'tiles'
          2        INIT_METHOD_CALL                                         ~1, 'has'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0  $2      
          5        BOOL_NOT                                         ~3      $2
          6      > JMPZ                                                     ~3, ->11
  147     7    >   NEW                                              $4      'RuntimeException'
          8        SEND_VAL_EX                                              'Tile+does+not+exists'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $4
  150    11    >   NEW                                              $7      'Tiles'
         12        FETCH_OBJ_R                                      ~8      'tiles'
         13        INIT_METHOD_CALL                                         ~8, 'map'
         14        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FVOoEh%3A150%244'
         15        BIND_LEXICAL                                             ~9, !0
  154    16        SEND_VAL_EX                                         

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.61 ms | 1428 KiB | 21 Q