3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Demo { public function __construct(DateTimeInterface $dateTime) { $this->date = $dateTime; } public function getDateTime(): DateTimeInterface { return $this->date; } public function echo() { echo $this->date->format("d/m/Y h:i:s"); } } $demo = new Demo(new DateTime()); $demo->echo()."\n"; $demo->getDateTime()->add('+1D'); $demo->echo();

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.0150.00418.80
8.3.50.0080.00818.44
8.3.40.0070.01318.95
8.3.30.0070.00718.97
8.3.20.0050.00319.46
8.3.10.0080.00023.61
8.3.00.0050.00320.68
8.2.180.0100.00718.54
8.2.170.0070.01122.96
8.2.160.0100.00322.26
8.2.150.0040.00424.18
8.2.140.0050.00224.66
8.2.130.0080.00018.16
8.2.120.0040.00426.35
8.2.110.0070.00322.20
8.2.100.0040.00817.91
8.2.90.0000.00818.00
8.2.80.0000.00817.97
8.2.70.0000.00818.18
8.2.60.0000.00918.16
8.2.50.0090.00018.10
8.2.40.0040.00419.46
8.2.30.0040.00419.32
8.2.20.0000.00718.00
8.2.10.0000.00717.92
8.2.00.0050.00517.71
8.1.280.0120.00325.92
8.1.270.0040.00419.00
8.1.260.0120.00626.35
8.1.250.0110.00428.09
8.1.240.0000.00823.92
8.1.230.0030.01017.61
8.1.220.0000.00917.77
8.1.210.0080.00018.77
8.1.200.0060.00317.25
8.1.190.0000.00817.50
8.1.180.0040.00418.10
8.1.170.0090.00018.77
8.1.160.0000.00718.97
8.1.150.0050.00219.02
8.1.140.0000.00722.18
8.1.130.0030.00320.23
8.1.120.0040.00417.69
8.1.110.0070.00017.62
8.1.100.0040.00417.66
8.1.90.0070.00017.56
8.1.80.0000.00717.54
8.1.70.0000.00717.57
8.1.60.0050.00317.77
8.1.50.0080.00017.64
8.1.40.0040.00417.66
8.1.30.0000.00817.64
8.1.20.0030.00517.66
8.1.10.0030.00617.60
8.1.00.0070.00017.59
8.0.300.0020.00518.77
8.0.290.0000.00916.88
8.0.280.0000.00718.38
8.0.270.0000.00717.34
8.0.260.0000.00618.38
8.0.250.0000.00817.24
8.0.240.0000.00617.25
8.0.230.0050.00217.07
8.0.220.0040.00717.12
8.0.210.0050.00317.07
8.0.200.0000.00717.26
8.0.190.0000.00817.23
8.0.180.0050.00317.16
8.0.170.0030.00517.17
8.0.160.0040.00417.25
8.0.150.0040.00417.09
8.0.140.0050.00217.01
8.0.130.0030.00313.51
8.0.120.0030.00617.11
8.0.110.0040.00417.14
8.0.100.0040.00417.14
8.0.90.0040.00417.05
8.0.80.0080.01017.10
8.0.70.0000.00717.23
8.0.60.0050.00317.00
8.0.50.0020.00516.95
8.0.30.0100.01017.39
8.0.20.0050.01517.40
8.0.10.0050.00217.10
8.0.00.0110.00817.10
7.4.330.0020.00215.55
7.4.320.0000.00616.69
7.4.300.0050.00216.75
7.4.290.0070.00016.70
7.4.280.0030.00616.69
7.4.270.0030.00316.77
7.4.260.0070.00016.66
7.4.250.0050.00316.62
7.4.240.0030.00316.58
7.4.230.0040.00416.78
7.4.220.0030.00516.77
7.4.210.0100.00416.73
7.4.200.0070.00016.49
7.4.160.0090.00716.68
7.4.140.0090.01117.86
7.4.130.0150.00316.78
7.4.120.0110.00916.63
7.4.110.0160.01016.82
7.4.100.0030.01316.52
7.4.90.0080.00816.77
7.4.80.0060.01019.39
7.4.70.0070.01016.75
7.4.60.0120.00416.44
7.4.50.0060.00916.86
7.4.40.0060.01116.67
7.4.00.0100.00315.09
7.3.330.0050.00013.50
7.3.320.0050.00013.45
7.3.310.0000.00916.50
7.3.300.0000.00616.47
7.3.290.0000.00716.41
7.3.280.0030.01216.52
7.3.260.0100.00916.48
7.3.240.0090.00916.68
7.3.230.0080.01216.70
7.3.210.0100.00716.47
7.3.200.0070.01116.61
7.3.190.0090.01216.72
7.3.180.0170.00016.54
7.3.170.0130.01016.58
7.3.160.0060.01116.69
7.2.330.0140.00416.48
7.2.320.0070.01016.94
7.2.310.0120.00416.71
7.2.300.0030.01316.90
7.2.290.0050.01616.98
7.2.110.0030.01316.67
7.2.100.0070.00716.83
7.2.90.0080.00416.88
7.2.80.0030.00916.75
7.2.70.0090.00316.62
7.2.60.0170.00016.79
7.2.50.0070.01716.95
7.2.40.0110.00416.65
7.2.30.0060.00917.06
7.2.20.0070.00717.11
7.2.10.0000.01817.07
7.2.00.0030.01216.91
7.1.230.0120.00015.95
7.1.220.0030.01015.59
7.1.210.0090.00316.06
7.1.200.0030.01015.81
7.1.190.0100.00315.86
7.1.180.0040.00715.75
7.1.170.0100.00316.01
7.1.160.0030.01216.03
7.1.150.0090.00615.77
7.1.140.0050.00815.73
7.1.130.0040.01015.62
7.1.120.0030.01015.95
7.1.110.0070.00715.96
7.1.100.0040.00716.02
7.1.90.0060.00715.63
7.1.80.0080.00316.02
7.1.70.0000.01315.82
7.1.60.0270.01333.65
7.1.50.0260.01333.94
7.1.40.0260.01333.75
7.1.30.0160.01633.70
7.1.20.0240.01033.84
7.1.10.0110.00315.68
7.1.00.0060.00915.87
5.6.380.0000.01614.20

preferences:
40.01 ms | 400 KiB | 5 Q