3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CheckForMaximumNumberOfCharacters { private string $format = 'Это поле содержит %d символов. Максимальное количество символов для этого поля - %u'; private int $standard; public function __construct(int $standard) { $this->standard = $standard; } public function __invoke(mixed $value): ?string { $numberOfCharacters = iconv_strlen($value); return ($numberOfCharacters > $this->standard) ? sprintf($this->format, $numberOfCharacters, $this->standard) : null; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIZpF
function name:  (null)
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   20     0  E > > RETURN                                                   1

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

End of function __construct

Function __invoke:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 17
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 18
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UIZpF
function name:  __invoke
number of ops:  22
compiled vars:  !0 = $value, !1 = $numberOfCharacters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   RECV                                             !0      
   16     1        INIT_FCALL_BY_NAME                                       'iconv_strlen'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
   18     5        FETCH_OBJ_R                                      ~4      'standard'
          6        IS_SMALLER                                               ~4, !1
          7      > JMPZ                                                     ~5, ->17
          8    >   INIT_FCALL                                               'sprintf'
          9        FETCH_OBJ_R                                      ~6      'format'
         10        SEND_VAL                                                 ~6
         11        SEND_VAR                                                 !1
         12        FETCH_OBJ_R                                      ~7      'standard'
         13        SEND_VAL                                                 ~7
         14        DO_ICALL                                         $8      
         15        QM_ASSIGN                                        ~9      $8
         16      > JMP                                                      ->18
         17    >   QM_ASSIGN                                        ~9      null
         18    >   VERIFY_RETURN_TYPE                                       ~9
         19      > RETURN                                                   ~9
   19    20*       VERIFY_RETURN_TYPE                                       
         21*     > RETURN                                                   null

End of function __invoke

End of class CheckForMaximumNumberOfCharacters.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
134.65 ms | 998 KiB | 14 Q