3v4l.org

run code in 300+ PHP versions simultaneously
<?php function _n($s, $p, $c) { return $c == 1 ? $s : $c; } function number_format_i18n($n) { return $n; } class a { function total_responses() { return 4; } function total_unfiltered_responses() { return 21; } } $filters['totals'] = new a; printf( _n( '%s match out of %s total', '%s matches out of %s total', $filters['totals']->total_responses() ), number_format_i18n( $filters['totals']->total_responses() ), number_format_i18n( $filters['totals']->total_unfiltered_responses() ) );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sN8gX
function name:  (null)
number of ops:  30
compiled vars:  !0 = $filters
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $2      'a'
          1        DO_FCALL                                      0          
          2        ASSIGN_DIM                                               !0, 'totals'
          3        OP_DATA                                                  $2
   18     4        INIT_FCALL                                               'printf'
          5        INIT_FCALL                                               '_n'
          6        SEND_VAL                                                 '%25s+match+out+of+%25s+total'
          7        SEND_VAL                                                 '%25s+matches+out+of+%25s+total'
          8        FETCH_DIM_R                                      ~4      !0, 'totals'
          9        INIT_METHOD_CALL                                         ~4, 'total_responses'
         10        DO_FCALL                                      0  $5      
         11        SEND_VAR                                                 $5
         12        DO_FCALL                                      0  $6      
         13        SEND_VAR                                                 $6
         14        INIT_FCALL                                               'number_format_i18n'
         15        FETCH_DIM_R                                      ~7      !0, 'totals'
         16        INIT_METHOD_CALL                                         ~7, 'total_responses'
         17        DO_FCALL                                      0  $8      
         18        SEND_VAR                                                 $8
         19        DO_FCALL                                      0  $9      
         20        SEND_VAR                                                 $9
         21        INIT_FCALL                                               'number_format_i18n'
         22        FETCH_DIM_R                                      ~10     !0, 'totals'
         23        INIT_METHOD_CALL                                         ~10, 'total_unfiltered_responses'
         24        DO_FCALL                                      0  $11     
         25        SEND_VAR                                                 $11
         26        DO_FCALL                                      0  $12     
         27        SEND_VAR                                                 $12
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Function _n:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 5, Position 2 = 7
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sN8gX
function name:  _n
number of ops:  10
compiled vars:  !0 = $s, !1 = $p, !2 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    4     3        IS_EQUAL                                                 !2, 1
          4      > JMPZ                                                     ~3, ->7
          5    >   QM_ASSIGN                                        ~4      !0
          6      > JMP                                                      ->8
          7    >   QM_ASSIGN                                        ~4      !2
          8    > > RETURN                                                   ~4
    5     9*     > RETURN                                                   null

End of function _n

Function number_format_i18n:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sN8gX
function name:  number_format_i18n
number of ops:  3
compiled vars:  !0 = $n
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
    7     1      > RETURN                                                   !0
    8     2*     > RETURN                                                   null

End of function number_format_i18n

Class a:
Function total_responses:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sN8gX
function name:  total_responses
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E > > RETURN                                                   4
   12     1*     > RETURN                                                   null

End of function total_responses

Function total_unfiltered_responses:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sN8gX
function name:  total_unfiltered_responses
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E > > RETURN                                                   21
   15     1*     > RETURN                                                   null

End of function total_unfiltered_responses

End of class a.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
176.55 ms | 1402 KiB | 18 Q