3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getLastDay($mes = null, $ano = null) { $mes = is_null($mes) ? date('m') : $mes; $ano = is_null($ano) ? date('Y') : $ano; $data = $ano . '-' . $mes . '-' . '01'; return date('t', strtotime($data)); } echo getLastDay(02, 2012);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/QgKBI
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'getlastday'
          1        SEND_VAL                                                 2
          2        SEND_VAL                                                 2012
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function getlastday:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 9
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 18
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 18
Branch analysis from position: 13
Branch analysis from position: 18
filename:       /in/QgKBI
function name:  getLastDay
number of ops:  34
compiled vars:  !0 = $mes, !1 = $ano, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
    5     2        TYPE_CHECK                                    2          !0
          3      > JMPZ                                                     ~3, ->9
          4    >   INIT_FCALL                                               'date'
          5        SEND_VAL                                                 'm'
          6        DO_ICALL                                         $4      
          7        QM_ASSIGN                                        ~5      $4
          8      > JMP                                                      ->10
          9    >   QM_ASSIGN                                        ~5      !0
         10    >   ASSIGN                                                   !0, ~5
    6    11        TYPE_CHECK                                    2          !1
         12      > JMPZ                                                     ~7, ->18
         13    >   INIT_FCALL                                               'date'
         14        SEND_VAL                                                 'Y'
         15        DO_ICALL                                         $8      
         16        QM_ASSIGN                                        ~9      $8
         17      > JMP                                                      ->19
         18    >   QM_ASSIGN                                        ~9      !1
         19    >   ASSIGN                                                   !1, ~9
    9    20        CONCAT                                           ~11     !1, '-'
         21        CONCAT                                           ~12     ~11, !0
         22        CONCAT                                           ~13     ~12, '-'
         23        CONCAT                                           ~14     ~13, '01'
         24        ASSIGN                                                   !2, ~14
   11    25        INIT_FCALL                                               'date'
         26        SEND_VAL                                                 't'
         27        INIT_FCALL                                               'strtotime'
         28        SEND_VAR                                                 !2
         29        DO_ICALL                                         $16     
         30        SEND_VAR                                                 $16
         31        DO_ICALL                                         $17     
         32      > RETURN                                                   $17
   12    33*     > RETURN                                                   null

End of function getlastday

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.12 ms | 1394 KiB | 18 Q