3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ErrorListViewHelper extends ViewHelper implements ViewHelperInterface { public function objectToArray(mixed $object): array { if (get_class($object) !== 'ErrorList') { throw new Exception('Этот метод принимает только объекты класса ErrorList.'); } $listFields = $this->getListFields($object); $result = []; foreach ($listFields as $field) { $valueField = implode(" ", $object->getListOfFieldErrors($field)); $valueField = $this->escapeMetacharacters($valueField); $result = $valueField; } } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TfEmJ
function name:  (null)
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                            'errorlistviewhelper', 'viewhelper'
   21     1      > RETURN                                                   1

Class ErrorListViewHelper:
Function objecttoarray:
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 = 108) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 29
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 29
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 29
filename:       /in/TfEmJ
function name:  objectToArray
number of ops:  32
compiled vars:  !0 = $object, !1 = $listFields, !2 = $result, !3 = $field, !4 = $valueField
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        GET_CLASS                                        ~5      !0
          2        IS_NOT_IDENTICAL                                         ~5, 'ErrorList'
          3      > JMPZ                                                     ~6, ->8
    8     4    >   NEW                                              $7      'Exception'
          5        SEND_VAL_EX                                              '%D0%AD%D1%82%D0%BE%D1%82+%D0%BC%D0%B5%D1%82%D0%BE%D0%B4+%D0%BF%D1%80%D0%B8%D0%BD%D0%B8%D0%BC%D0%B0%D0%B5%D1%82+%D1%82%D0%BE%D0%BB%D1%8C%D0%BA%D0%BE+%D0%BE%D0%B1%D1%8A%D0%B5%D0%BA%D1%82%D1%8B+%D0%BA%D0%BB%D0%B0%D1%81%D1%81%D0%B0+ErrorList.'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $7
   11     8    >   INIT_METHOD_CALL                                         'getListFields'
          9        SEND_VAR_EX                                              !0
         10        DO_FCALL                                      0  $9      
         11        ASSIGN                                                   !1, $9
   13    12        ASSIGN                                                   !2, <array>
   15    13      > FE_RESET_R                                       $12     !1, ->29
         14    > > FE_FETCH_R                                               $12, !3, ->29
   16    15    >   INIT_FCALL                                               'implode'
         16        SEND_VAL                                                 '+'
         17        INIT_METHOD_CALL                                         !0, 'getListOfFieldErrors'
         18        SEND_VAR_EX                                              !3
         19        DO_FCALL                                      0  $13     
         20        SEND_VAR                                                 $13
         21        DO_ICALL                                         $14     
         22        ASSIGN                                                   !4, $14
   17    23        INIT_METHOD_CALL                                         'escapeMetacharacters'
         24        SEND_VAR_EX                                              !4
         25        DO_FCALL                                      0  $16     
         26        ASSIGN                                                   !4, $16
   18    27        ASSIGN                                                   !2, !4
   15    28      > JMP                                                      ->14
         29    >   FE_FREE                                                  $12
   20    30        VERIFY_RETURN_TYPE                                       
         31      > RETURN                                                   null

End of function objecttoarray

End of class ErrorListViewHelper.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.08 ms | 1002 KiB | 14 Q