3v4l.org

run code in 300+ PHP versions simultaneously
<?php class CDateTime extends DateTime { public function __toString() { return $this->format('Y-m-d H:i'); } public function ConvertfromString( $date , $input , $output ) { $output = ""; $dt = $this->createFromFormat($input, $date ); $output = $dt->format( $output ); return ($output); } public function diff($now = 'NOW') { if ( !($now instanceOf DateTime) ) { $now = new DateTime($now); }; return parent::diff($now); } public function getAge($now = 'NOW') { return $this->diff($now)->format('%y'); } } ?>

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0070.01116.75
8.3.50.0140.00721.08
8.3.40.0070.00718.80
8.3.30.0110.00318.63
8.3.20.0040.00420.16
8.3.10.0000.00821.91
8.3.00.0040.00421.91
8.2.180.0150.00318.25
8.2.170.0130.00322.96
8.2.160.0070.00720.39
8.2.150.0040.00424.18
8.2.140.0050.00324.66
8.2.130.0060.00321.07
8.2.120.0000.00826.35
8.2.110.0030.00622.13
8.2.100.0050.00518.59
8.1.280.0070.00725.92
8.1.270.0080.00823.83
8.1.260.0060.00328.09
8.1.250.0040.01128.09
8.1.240.0030.00618.57
8.1.230.0060.00318.57
7.0.20.0300.05720.12
7.0.10.0170.07720.10
7.0.00.0000.09320.12
5.6.170.0270.03320.56
5.6.160.0170.07720.46
5.6.150.0070.08318.18
5.6.140.0100.06318.12
5.6.130.0030.05318.21
5.6.120.0130.07721.05
5.6.110.0070.08321.13
5.6.100.0070.08321.00
5.6.90.0070.06020.89
5.6.80.0170.07320.55
5.5.310.0400.04320.36
5.5.300.0030.04018.01
5.5.290.0100.08317.98
5.5.280.0100.06720.75
5.5.270.0130.04320.90
5.5.260.0100.06320.77
5.5.250.0030.05020.50
5.5.240.0230.07320.18

preferences:
42.92 ms | 401 KiB | 5 Q