3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClientController { private $collection; public function __construct($collection) { $this->collection = $collection; $this->validate(); } protected function validate() { foreach ($this->collection as $model) { $props = get_object_vars($model); foreach ($props as $key => $val) { $method = 'validate' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key))); $valid = $model->$method(); if (!$valid) { $model->addError($key); } } if (length($model->getErrors())) { $model->setValid(false); } } } public function getCollection() { return $this->collection; } } class ClientModel { private $name; private $cpf; private $birth_date; private $email; private static $is_valid = true; private static $errors = []; public function __construct($name, $cpf, $birth_date, $email) { $this->setName($name); $this->setCpf($cpf); $this->setBirthDate($birth_date); $this->setEmail($email); } public function getName() { return $this->name; } public function setName($name) { $this->name = $name; } public function validateName() { return (!empty($this->name) && !preg_match("/^[a-zA-Z'-]+$/", $this->name)); } public function getCpf() { return $this->cpf; } public function setCpf($cpf) { $this->cpf = $cpf; } public function validateCpf() { return (!empty($this->cpf) && ctype_digit($this->cpf)); } public function getBirthDate() { return $this->birth_date; } public function setBirthDate($birth_date) { $this->birth_date = $birth_date; } public function validateBirthDate() { return (!empty($this->birth_date) && preg_match("/^[0-9]{1,2}\/[0-9]{1,2}\/[0-9]{4}$/", $this->birth_date)); } public function getEmail() { return $this->email; } public function setEmail($email) { $this->email = $email; } public function validateEmail() { return (filter_var($this->email, FILTER_VALIDATE_EMAIL)); } public function isValid() { return $this->is_valid; } public function setValid($valid) { $this->is_valid = $valid; } public function addError($field) { $this->errors[] = $field; } public function getErrors() { return $this->errors; } } class ClientCollection { private $_clients = []; public function add(ClientModel $client) { $this->_clients[] = $client; end($this->_clients); return key($this->_clients); } public function get($key) { if (isset($this->_clients[$key])) { return $this->_clients[$key]; } else { throw new Exception("Client does not exist"); } } public function delete($key) { if (isset($this->_clients[$key])) { unset($this->_clients[$key]); } else { throw new Exception("Client does not exist"); } } } $clients = array( array("name" => "Hubert Adams", "cpf" => "86383860011", "birth_date" => "20/07/2015", "email" => "carlee_fadel@block.name"), array("name" => "Isabelle Mann", "cpf" => "58958058684", "birth_date" => "27/07/2015", "email" => "dortha.pacocha@ebert.biz"), array("name" => "Jayda Reichert", "cpf" => "01075384664", "birth_date" => "24/07/2015", "email" => "kaylie@stehrgaylord.biz"), array("name" => "Brionna Reinger", "cpf" => "48991299636", "birth_date" => "22/07/2015", "email" => "ansley.orn@herzog.org"), array("name" => "Diego", "cpf" => "55483741684aaaa", "birth_date" => "", "email" => "raoul mills com") ); $collection = new ClientCollection(); foreach ($clients as $client) { $model = new ClientModel($client['name'], $client['cpf'], $client['birth_date'], $client['email']); $collection->add($model); } $ctrl = new ClientController($collection); var_dump($ctrl->getCollection());
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 5, Position 2 = 25
Branch analysis from position: 5
2 jumps found. (Code = 78) Position 1 = 6, Position 2 = 25
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
Branch analysis from position: 25
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 25
filename:       /in/DbUDj
function name:  (null)
number of ops:  36
compiled vars:  !0 = $clients, !1 = $collection, !2 = $client, !3 = $model, !4 = $ctrl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  126     0  E >   ASSIGN                                                   !0, <array>
  134     1        NEW                                              $6      'ClientCollection'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $6
  135     4      > FE_RESET_R                                       $9      !0, ->25
          5    > > FE_FETCH_R                                               $9, !2, ->25
  136     6    >   NEW                                              $10     'ClientModel'
          7        CHECK_FUNC_ARG                                           
          8        FETCH_DIM_FUNC_ARG                               $11     !2, 'name'
          9        SEND_FUNC_ARG                                            $11
         10        CHECK_FUNC_ARG                                           
         11        FETCH_DIM_FUNC_ARG                               $12     !2, 'cpf'
         12        SEND_FUNC_ARG                                            $12
         13        CHECK_FUNC_ARG                                           
         14        FETCH_DIM_FUNC_ARG                               $13     !2, 'birth_date'
         15        SEND_FUNC_ARG                                            $13
         16        CHECK_FUNC_ARG                                           
         17        FETCH_DIM_FUNC_ARG                               $14     !2, 'email'
         18        SEND_FUNC_ARG                                            $14
         19        DO_FCALL                                      0          
         20        ASSIGN                                                   !3, $10
  137    21        INIT_METHOD_CALL                                         !1, 'add'
         22        SEND_VAR_EX                                              !3
         23        DO_FCALL                                      0          
  135    24      > JMP                                                      ->5
         25    >   FE_FREE                                                  $9
  140    26        NEW                                              $18     'ClientController'
         27        SEND_VAR_EX                                              !1
         28        DO_FCALL                                      0          
         29        ASSIGN                                                   !4, $18
  141    30        INIT_FCALL                                               'var_dump'
         31        INIT_METHOD_CALL                                         !4, 'getCollection'
         32        DO_FCALL                                      0  $21     
         33        SEND_VAR                                                 $21
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

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

End of function __construct

Function validate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 45
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 45
Branch analysis from position: 3
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 34
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 34
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 33
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 33
Branch analysis from position: 34
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 44
Branch analysis from position: 41
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 44
Branch analysis from position: 34
Branch analysis from position: 45
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 45
filename:       /in/DbUDj
function name:  validate
number of ops:  47
compiled vars:  !0 = $model, !1 = $props, !2 = $val, !3 = $key, !4 = $method, !5 = $valid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   FETCH_OBJ_R                                      ~6      'collection'
          1      > FE_RESET_R                                       $7      ~6, ->45
          2    > > FE_FETCH_R                                               $7, !0, ->45
   15     3    >   INIT_FCALL                                               'get_object_vars'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $8      
          6        ASSIGN                                                   !1, $8
   16     7      > FE_RESET_R                                       $10     !1, ->34
          8    > > FE_FETCH_R                                       ~11     $10, !2, ->34
          9    >   ASSIGN                                                   !3, ~11
   17    10        INIT_FCALL                                               'str_replace'
         11        SEND_VAL                                                 '+'
         12        SEND_VAL                                                 ''
         13        INIT_FCALL                                               'ucwords'
         14        INIT_FCALL                                               'str_replace'
         15        SEND_VAL                                                 '_'
         16        SEND_VAL                                                 '+'
         17        SEND_VAR                                                 !3
         18        DO_ICALL                                         $13     
         19        SEND_VAR                                                 $13
         20        DO_ICALL                                         $14     
         21        SEND_VAR                                                 $14
         22        DO_ICALL                                         $15     
         23        CONCAT                                           ~16     'validate', $15
         24        ASSIGN                                                   !4, ~16
   18    25        INIT_METHOD_CALL                                         !0, !4
         26        DO_FCALL                                      0  $18     
         27        ASSIGN                                                   !5, $18
   19    28        BOOL_NOT                                         ~20     !5
         29      > JMPZ                                                     ~20, ->33
   20    30    >   INIT_METHOD_CALL                                         !0, 'addError'
         31        SEND_VAR_EX                                              !3
         32        DO_FCALL                                      0          
   16    33    > > JMP                                                      ->8
         34    >   FE_FREE                                                  $10
   23    35        INIT_FCALL_BY_NAME                                       'length'
         36        INIT_METHOD_CALL                                         !0, 'getErrors'
         37        DO_FCALL                                      0  $22     
         38        SEND_VAR_NO_REF_EX                                       $22
         39        DO_FCALL                                      0  $23     
         40      > JMPZ                                                     $23, ->44
   24    41    >   INIT_METHOD_CALL                                         !0, 'setValid'
         42        SEND_VAL_EX                                              <false>
         43        DO_FCALL                                      0          
   14    44    > > JMP                                                      ->2
         45    >   FE_FREE                                                  $7
   27    46      > RETURN                                                   null

End of function validate

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

End of function getcollection

End of class ClientController.

Class ClientModel:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbUDj
function name:  __construct
number of ops:  17
compiled vars:  !0 = $name, !1 = $cpf, !2 = $birth_date, !3 = $email
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   42     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3        RECV                                             !3      
   43     4        INIT_METHOD_CALL                                         'setName'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
   44     7        INIT_METHOD_CALL                                         'setCpf'
          8        SEND_VAR_EX                                              !1
          9        DO_FCALL                                      0          
   45    10        INIT_METHOD_CALL                                         'setBirthDate'
         11        SEND_VAR_EX                                              !2
         12        DO_FCALL                                      0          
   46    13        INIT_METHOD_CALL                                         'setEmail'
         14        SEND_VAR_EX                                              !3
         15        DO_FCALL                                      0          
   47    16      > RETURN                                                   null

End of function __construct

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

End of function getname

Function setname:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbUDj
function name:  setName
number of ops:  4
compiled vars:  !0 = $name
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   52     0  E >   RECV                                             !0      
   53     1        ASSIGN_OBJ                                               'name'
          2        OP_DATA                                                  !0
   54     3      > RETURN                                                   null

End of function setname

Function validatename:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 10
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/DbUDj
function name:  validateName
number of ops:  12
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   56     0  E >   ISSET_ISEMPTY_PROP_OBJ                           ~0      'name'
          1        BOOL_NOT                                         ~1      ~0
          2      > JMPZ_EX                                          ~1      ~1, ->10
          3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5E%5Ba-zA-Z%27-%5D%2B%24%2F'
          5        FETCH_OBJ_R                                      ~2      'name'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                         $3      
          8        BOOL_NOT                                         ~4      $3
          9        BOOL                                             ~1      ~4
         10    > > RETURN                                                   ~1
   57    11*     > RETURN                                                   null

End of function validatename

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

End of function getcpf

Function setcpf:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbUDj
function name:  setCpf
number of ops:  4
compiled vars:  !0 = $cpf
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   61     0  E >   RECV                                             !0      
   62     1        ASSIGN_OBJ                                               'cpf'
          2        OP_DATA                                                  !0
   63     3      > RETURN                                                   null

End of function setcpf

Function validatecpf:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 8
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/DbUDj
function name:  validateCpf
number of ops:  10
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   65     0  E >   ISSET_ISEMPTY_PROP_OBJ                           ~0      'cpf'
          1        BOOL_NOT                                         ~1      ~0
          2      > JMPZ_EX                                          ~1      ~1, ->8
          3    >   INIT_FCALL                                               'ctype_digit'
          4        FETCH_OBJ_R                                      ~2      'cpf'
          5        SEND_VAL                                                 ~2
          6        DO_ICALL                                         $3      
          7        BOOL                                             ~1      $3
          8    > > RETURN                                                   ~1
   66     9*     > RETURN                                                   null

End of function validatecpf

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

End of function getbirthdate

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

End of function setbirthdate

Function validatebirthdate:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 46) Position 1 = 3, Position 2 = 9
Branch analysis from position: 3
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/DbUDj
function name:  validateBirthDate
number of ops:  11
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   74     0  E >   ISSET_ISEMPTY_PROP_OBJ                           ~0      'birth_date'
          1        BOOL_NOT                                         ~1      ~0
          2      > JMPZ_EX                                          ~1      ~1, ->9
          3    >   INIT_FCALL                                               'preg_match'
          4        SEND_VAL                                                 '%2F%5E%5B0-9%5D%7B1%2C2%7D%5C%2F%5B0-9%5D%7B1%2C2%7D%5C%2F%5B0-9%5D%7B4%7D%24%2F'
          5        FETCH_OBJ_R                                      ~2      'birth_date'
          6        SEND_VAL                                                 ~2
          7        DO_ICALL                                         $3      
          8        BOOL                                             ~1      $3
          9    > > RETURN                                                   ~1
   75    10*     > RETURN                                                   null

End of function validatebirthdate

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

End of function getemail

Function setemail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbUDj
function name:  setEmail
number of ops:  4
compiled vars:  !0 = $email
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   79     0  E >   RECV                                             !0      
   80     1        ASSIGN_OBJ                                               'email'
          2        OP_DATA                                                  !0
   81     3      > RETURN                                                   null

End of function setemail

Function validateemail:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbUDj
function name:  validateEmail
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   83     0  E >   INIT_FCALL                                               'filter_var'
          1        FETCH_OBJ_R                                      ~0      'email'
          2        SEND_VAL                                                 ~0
          3        SEND_VAL                                                 274
          4        DO_ICALL                                         $1      
          5      > RETURN                                                   $1
   84     6*     > RETURN                                                   null

End of function validateemail

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

End of function isvalid

Function setvalid:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbUDj
function name:  setValid
number of ops:  4
compiled vars:  !0 = $valid
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   89     0  E >   RECV                                             !0      
   90     1        ASSIGN_OBJ                                               'is_valid'
          2        OP_DATA                                                  !0
   91     3      > RETURN                                                   null

End of function setvalid

Function adderror:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbUDj
function name:  addError
number of ops:  5
compiled vars:  !0 = $field
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   93     0  E >   RECV                                             !0      
   94     1        FETCH_OBJ_W                                      $1      'errors'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
   95     4      > RETURN                                                   null

End of function adderror

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

End of function geterrors

End of class ClientModel.

Class ClientCollection:
Function add:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DbUDj
function name:  add
number of ops:  14
compiled vars:  !0 = $client
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  105     0  E >   RECV                                             !0      
  106     1        FETCH_OBJ_W                                      $1      '_clients'
          2        ASSIGN_DIM                                               $1
          3        OP_DATA                                                  !0
  107     4        INIT_FCALL                                               'end'
          5        FETCH_OBJ_W                                      $3      '_clients'
          6        SEND_REF                                                 $3
          7        DO_ICALL                                                 
  108     8        INIT_FCALL                                               'key'
          9        FETCH_OBJ_R                                      ~5      '_clients'
         10        SEND_VAL                                                 ~5
         11        DO_ICALL                                         $6      
         12      > RETURN                                                   $6
  109    13*     > RETURN                                                   null

End of function add

Function get:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/DbUDj
function name:  get
number of ops:  13
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  110     0  E >   RECV                                             !0      
  111     1        FETCH_OBJ_IS                                     ~1      '_clients'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->8
  112     4    >   FETCH_OBJ_R                                      ~3      '_clients'
          5        FETCH_DIM_R                                      ~4      ~3, !0
          6      > RETURN                                                   ~4
          7*       JMP                                                      ->12
  114     8    >   NEW                                              $5      'Exception'
          9        SEND_VAL_EX                                              'Client+does+not+exist'
         10        DO_FCALL                                      0          
         11      > THROW                                         0          $5
  116    12*     > RETURN                                                   null

End of function get

Function delete:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/DbUDj
function name:  delete
number of ops:  12
compiled vars:  !0 = $key
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  117     0  E >   RECV                                             !0      
  118     1        FETCH_OBJ_IS                                     ~1      '_clients'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->7
  119     4    >   FETCH_OBJ_UNSET                                  $3      '_clients'
          5        UNSET_DIM                                                $3, !0
          6      > JMP                                                      ->11
  121     7    >   NEW                                              $4      'Exception'
          8        SEND_VAL_EX                                              'Client+does+not+exist'
          9        DO_FCALL                                      0          
         10      > THROW                                         0          $4
  123    11    > > RETURN                                                   null

End of function delete

End of class ClientCollection.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
201.22 ms | 1424 KiB | 31 Q