3v4l.org

run code in 300+ PHP versions simultaneously
<?php $days = 500; $years_remaining = intval($days / 365); //divide by 365 and throw away the remainder $days_remaining = $days % 365; echo $years_remaining . " years and " . $days_remaining . " days";
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ot9Th
function name:  (null)
number of ops:  11
compiled vars:  !0 = $days, !1 = $years_remaining, !2 = $days_remaining
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, 500
    4     1        DIV                                              ~4      !0, 365
          2        CAST                                          4  ~5      ~4
          3        ASSIGN                                                   !1, ~5
    5     4        MOD                                              ~7      !0, 365
          5        ASSIGN                                                   !2, ~7
    7     6        CONCAT                                           ~9      !1, '+years+and+'
          7        CONCAT                                           ~10     ~9, !2
          8        CONCAT                                           ~11     ~10, '+days'
          9        ECHO                                                     ~11
         10      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.48 ms | 1392 KiB | 13 Q