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'); } var_dump(self::clicked($this->position)); 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)), new Tile(new Position(0, 2)), new Tile(new Position(0, 3)), new Tile(new Position(0, 4)), new Tile(new Position(0, 5)) )); $board->click(new Position(0, 0)); $board->click(new Position(0, 1)); $board->click(new Position(0, 2)); $board->click(new Position(0, 3)); $board->click(new Position(0, 4)); $board->click(new Position(0, 5)); print "\n";print "\n";print "\n";print "\n";print "\n"; Tile::clicked(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/0Dpdb
function name:  (null)
number of ops:  114
compiled vars:  !0 = $board
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  164     0  E >   NEW                                              $1      'Board'
          1        NEW                                              $2      'Tiles'
  165     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
  166    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
  167    18        NEW                                              $11     'Tile'
         19        NEW                                              $12     'Position'
         20        SEND_VAL_EX                                              0
         21        SEND_VAL_EX                                              2
         22        DO_FCALL                                      0          
         23        SEND_VAR_NO_REF_EX                                       $12
         24        DO_FCALL                                      0          
         25        SEND_VAR_NO_REF_EX                                       $11
  168    26        NEW                                              $15     'Tile'
         27        NEW                                              $16     'Position'
         28        SEND_VAL_EX                                              0
         29        SEND_VAL_EX                                              3
         30        DO_FCALL                                      0          
         31        SEND_VAR_NO_REF_EX                                       $16
         32        DO_FCALL                                      0          
         33        SEND_VAR_NO_REF_EX                                       $15
  169    34        NEW                                              $19     'Tile'
         35        NEW                                              $20     'Position'
         36        SEND_VAL_EX                                              0
         37        SEND_VAL_EX                                              4
         38        DO_FCALL                                      0          
         39        SEND_VAR_NO_REF_EX                                       $20
         40        DO_FCALL                                      0          
         41        SEND_VAR_NO_REF_EX                                       $19
  170    42        NEW                                              $23     'Tile'
         43        NEW                                              $24     'Position'
         44        SEND_VAL_EX                                              0
         45        SEND_VAL_EX                                              5
         46        DO_FCALL                                      0          
         47        SEND_VAR_NO_REF_EX                                       $24
         48        DO_FCALL                                      0          
         49        SEND_VAR_NO_REF_EX                                       $23
         50        DO_FCALL                                      0          
         51        SEND_VAR_NO_REF_EX                                       $2
         52        DO_FCALL                                      0          
  164    53        ASSIGN                                                   !0, $1
  174    54        INIT_METHOD_CALL                                         !0, 'click'
         55        NEW                                              $30     'Position'
         56        SEND_VAL_EX                                              0
         57        SEND_VAL_EX                                              0
         58        DO_FCALL                                      0          
         59        SEND_VAR_NO_REF_EX                                       $30
         60        DO_FCALL                                      0          
  175    61        INIT_METHOD_CALL                                         !0, 'click'
         62        NEW                                              $33     'Position'
         63        SEND_VAL_EX                                              0
         64        SEND_VAL_EX                                              1
         65        DO_FCALL                                      0          
         66        SEND_VAR_NO_REF_EX                                       $33
         67        DO_FCALL                                      0          
  176    68        INIT_METHOD_CALL                                         !0, 'click'
         69        NEW                                              $36     'Position'
         70        SEND_VAL_EX                                              0
         71        SEND_VAL_EX                                              2
         72        DO_FCALL                                      0          
         73        SEND_VAR_NO_REF_EX                                       $36
         74        DO_FCALL                                      0          
  177    75        INIT_METHOD_CALL                                         !0, 'click'
         76        NEW                                              $39     'Position'
         77        SEND_VAL_EX                                              0
         78        SEND_VAL_EX                                              3
         79        DO_FCALL                                      0          
         80        SEND_VAR_NO_REF_EX                                       $39
         81        DO_FCALL                                      0          
  178    82        INIT_METHOD_CALL                                         !0, 'click'
         83        NEW                                              $42     'Position'
         84        SEND_VAL_EX                                              0
         85        SEND_VAL_EX                                              4
         86        DO_FCALL                                      0          
         87        SEND_VAR_NO_REF_EX                                       $42
         88        DO_FCALL                                      0          
  179    89        INIT_METHOD_CALL                                         !0, 'click'
         90        NEW                                              $45     'Position'
         91        SEND_VAL_EX                                              0
         92        SEND_VAL_EX                                              5
         93        DO_FCALL                                      0          
         94        SEND_VAR_NO_REF_EX                                       $45
         95        DO_FCALL                                      0          
  181    96        ECHO                                                     '%0A'
         97        ECHO                                                     '%0A'
         98        ECHO                                                     '%0A'
         99        ECHO                                                     '%0A'
        100        ECHO                                                     '%0A'
  182   101        INIT_STATIC_METHOD_CALL                                  'Tile', 'clicked'
        102        NEW                                              $48     'Position'
        103        SEND_VAL_EX                                              0
        104        SEND_VAL_EX                                              1
        105        DO_FCALL                                      0          
        106        SEND_VAR                                                 $48
        107        DO_FCALL                                      0          
  184   108        INIT_FCALL                                               'var_dump'
        109        INIT_METHOD_CALL                                         !0, 'score'
        110        DO_FCALL                                      0  $51     
        111        SEND_VAR                                                 $51
        112        DO_ICALL                                                 
        113      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A82%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Dpdb
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $tile, !1 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   82     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
   83     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
   84     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A82%240

Function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A109%241:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Dpdb
function name:  {closure}
number of ops:  9
compiled vars:  !0 = $tile, !1 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  109     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
  110     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
  111     8*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A109%241

Function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A119%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/0Dpdb
function name:  {closure}
number of ops:  11
compiled vars:  !0 = $clicked, !1 = $nextTile
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  119     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  120     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
  121    10*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A119%242

Function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A136%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/0Dpdb
function name:  {closure}
number of ops:  14
compiled vars:  !0 = $tile, !1 = $tiles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  136     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
  137     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
  138     9    >   NEW                                              $4      'RuntimeException'
         10        SEND_VAL_EX                                              'Board+can+have+only+tile+at+each+position'
         11        DO_FCALL                                      0          
         12      > THROW                                         0          $4
  140    13    > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A136%243

Function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A151%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/0Dpdb
function name:  {closure}
number of ops:  15
compiled vars:  !0 = $tile, !1 = $position
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  151     0  E >   RECV                                             !0      
          1        BIND_STATIC                                              !1
  152     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
  153     8    >   INIT_METHOD_CALL                                         !0, 'click'
          9        DO_FCALL                                      0  $4      
         10        QM_ASSIGN                                        ~5      $4
         11      > JMP                                                      ->13
  154    12    >   QM_ASSIGN                                        ~5      !0
         13    > > RETURN                                                   ~5
  155    14*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2F0Dpdb%3A151%244

Class Position:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0Dpdb
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/0Dpdb
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/0Dpdb
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/0Dpdb
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/0Dpdb
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/0Dpdb
function name:  click
number of ops:  22
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_FCALL                                               'var_dump'
          8        INIT_STATIC_METHOD_CALL                                  'clicked'
          9        FETCH_OBJ_R                                      ~3      'position'
         10        SEND_VAL                                                 ~3
         11        DO_FCALL                                      0  $4      
         12        SEND_VAR                                                 $4
         13        DO_ICALL                                                 
   53    14        INIT_STATIC_METHOD_CALL                                  'clicked'
         15        FETCH_OBJ_R                                      ~6      'position'
         16        SEND_VAL                                                 ~6
         17        DO_FCALL                                      0  $7      
         18        VERIFY_RETURN_TYPE                                       $7
         19      > RETURN                                                   $7
   54    20*       VERIFY_RETURN_TYPE                                       
         21*     > 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/0Dpdb
function name:  isClicked
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   58     0  E >   FETCH_OBJ_R                                      ~0      'clicked'
          1        VERIFY_RETURN_TYPE                                       ~0
          2      > RETURN                                                   ~0
   59     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/0Dpdb
function name:  __construct
number of ops:  4
compiled vars:  !0 = $tiles
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   69     0  E >   RECV_VARIADIC                                    !0      
   71     1        ASSIGN_OBJ                                               'tiles'
          2        OP_DATA                                                  !0
   72     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/0Dpdb
function name:  count
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   76     0  E >   FETCH_OBJ_R                                      ~0      'tiles'
          1        COUNT                                            ~1      ~0
          2        VERIFY_RETURN_TYPE                                       ~1
          3      > RETURN                                                   ~1
   77     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/0Dpdb
function name:  hasMoreThan
number of ops:  14
compiled vars:  !0 = $position, !1 = $expectedLimit
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   RECV                                             !0      
          1        RECV                                             !1      
   81     2        INIT_METHOD_CALL                                         'find'
   82     3        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2F0Dpdb%3A82%240'
          4        BIND_LEXICAL                                             ~2, !0
   84     5        SEND_VAL_EX                                              ~2
          6        DO_FCALL                                      0  $3      
   85     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
   86    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/0Dpdb
function name:  each
number of ops:  7
compiled vars:  !0 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   88     0  E >   RECV                                             !0      
   90     1        INIT_FCALL                                               'array_map'
          2        SEND_VAR                                                 !0
          3        FETCH_OBJ_R                                      ~1      'tiles'
          4        SEND_VAL                                                 ~1
          5        DO_ICALL                                                 
   91     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/0Dpdb
function name:  find
number of ops:  14
compiled vars:  !0 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   93     0  E >   RECV                                             !0      
   95     1        NEW                                              $1      'Tiles'
          2        INIT_FCALL                                               'array_filter'
   96     3        FETCH_OBJ_R                                      ~2      'tiles'
          4        SEND_VAL                                                 ~2
   97     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
   99    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/0Dpdb
function name:  map
number of ops:  10
compiled vars:  !0 = $callback
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  101     0  E >   RECV                                             !0      
  103     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    

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.98 ms | 1428 KiB | 19 Q