3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface Visitor { public function visitCar(Car $car); public function visitGolf(Golf $golf); public function visitPorsche(Porsche $porsche); } interface Vehicle { public function accept(Visitor $v); } class Car implements Vehicle { public function accept(Visitor $v) { $v->visitCar($this); } } class Golf extends Car { public function accept(Visitor $v) { $v->visitGolf($this); } } class Porsche extends Car { public function accept(Visitor $v) { $v->visitPorsche($this); } } class DriveVisitor implements Visitor { public function visitCar(Car $car) { print 'Auto fährt' . PHP_EOL; } public function visitGolf(Golf $golf) { print 'Golf fährt schneller' . PHP_EOL; } public function visitPorsche(Porsche $porsche) { print 'Porsche fährt am schnellsten' . PHP_EOL; } } $c = new Car(); $g = new Golf(); $p = new Porsche(); $dv = new DriveVisitor(); $c->accept($dv); $g->accept($dv); $p->accept($dv);

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.120.0060.00320.60
8.3.110.0060.01320.94
8.3.100.0090.00024.06
8.3.90.0000.00726.77
8.3.80.0070.00417.97
8.3.70.0040.01118.56
8.3.60.0070.00716.63
8.3.50.0150.00521.95
8.3.40.0070.00718.79
8.3.30.0070.00718.66
8.3.20.0070.00720.38
8.3.10.0080.00020.54
8.3.00.0040.00420.39
8.2.240.0090.00019.15
8.2.230.0090.00022.58
8.2.220.0060.00337.54
8.2.210.0000.00926.77
8.2.200.0090.00016.35
8.2.190.0130.00316.63
8.2.180.0140.00716.38
8.2.170.0070.00722.96
8.2.160.0100.00320.43
8.2.150.0000.00824.18
8.2.140.0000.00824.66
8.2.130.0090.00019.23
8.2.120.0080.00026.35
8.2.110.0060.00320.28
8.2.100.0030.00717.91
8.2.90.0040.00420.47
8.2.80.0030.00618.03
8.2.70.0040.00417.89
8.2.60.0060.00317.93
8.2.50.0040.00417.63
8.2.40.0050.00220.56
8.2.30.0070.00021.25
8.2.20.0020.00517.68
8.2.10.0080.00018.06
8.2.00.0040.00417.98
8.1.300.0090.00620.18
8.1.290.0030.00630.84
8.1.280.0090.00925.92
8.1.270.0080.00023.92
8.1.260.0000.00828.09
8.1.250.0000.00828.09
8.1.240.0090.00023.86
8.1.230.0120.00021.03
8.1.220.0000.00817.74
8.1.210.0000.00719.09
8.1.200.0000.00817.22
8.1.190.0090.00017.23
8.1.180.0060.00318.10
8.1.170.0100.00018.37
8.1.160.0070.00020.89
8.1.150.0040.00418.85
8.1.140.0000.00719.57
8.1.130.0000.00717.69
8.1.120.0040.00417.50
8.1.110.0070.00417.52
8.1.100.0050.00317.46
8.1.90.0040.00417.47
8.1.80.0080.00017.49
8.1.70.0040.00417.48
8.1.60.0030.00617.63
8.1.50.0040.00417.44
8.1.40.0000.00817.44
8.1.30.0030.00617.68
8.1.20.0080.00017.52
8.1.10.0040.00417.59
8.1.00.0040.00417.47
8.0.300.0040.00420.06
8.0.290.0000.00816.63
8.0.280.0030.00318.44
8.0.270.0050.00317.25
8.0.260.0070.00017.25
8.0.250.0000.00717.00
8.0.240.0030.00316.88
8.0.230.0070.00016.96
8.0.220.0060.00016.86
8.0.210.0080.00016.96
8.0.200.0030.00317.03
8.0.190.0000.00816.99
8.0.180.0000.00816.87
8.0.170.0030.00617.00
8.0.160.0080.00017.03
8.0.150.0030.00516.93
8.0.140.0030.00716.80
8.0.130.0050.00013.39
8.0.120.0050.00316.89
8.0.110.0000.00716.86
8.0.100.0000.00716.89
8.0.90.0030.00617.00
8.0.80.0060.00916.95
8.0.70.0000.00816.78
8.0.60.0000.00716.78
8.0.50.0000.00716.97
8.0.30.0080.01117.11
8.0.20.0060.01317.40
8.0.10.0040.00417.08
8.0.00.0080.01016.76
7.4.330.0000.00516.77
7.4.320.0030.00316.46
7.4.300.0070.00016.62
7.4.290.0000.00716.52
7.4.280.0040.00416.63
7.4.270.0070.00016.64
7.4.260.0000.00716.52
7.4.250.0000.00816.59
7.4.240.0030.00316.53
7.4.230.0070.00016.62
7.4.220.0000.01716.50
7.4.210.0070.00716.63
7.4.200.0000.00716.50
7.4.160.0030.01316.61
7.4.150.0130.00417.40
7.4.140.0100.01017.86
7.4.130.0050.01316.56
7.4.120.0100.01016.61
7.4.110.0090.01216.32
7.4.100.0040.01516.56
7.4.90.0070.01016.55
7.4.80.0100.01419.39
7.4.70.0060.00916.61
7.4.60.0130.00316.31
7.4.50.0100.00316.20
7.4.40.0090.00616.32
7.4.30.0110.01116.66
7.4.00.0060.00915.06
7.3.330.0040.00413.18
7.3.320.0060.00013.15
7.3.310.0000.00716.18
7.3.300.0070.00016.37
7.3.290.0090.00716.37
7.3.280.0080.01216.37
7.3.270.0070.01017.40
7.3.260.0170.00016.38
7.3.250.0100.01016.41
7.3.240.0110.00916.30
7.3.230.0040.01716.39
7.3.210.0140.00316.39
7.3.200.0160.00016.64
7.3.190.0130.00316.23
7.3.180.0110.01116.41
7.3.170.0130.00316.44
7.3.160.0120.00616.52
7.2.330.0120.00616.76
7.2.320.0030.01516.73
7.2.310.0110.01416.46
7.2.300.0060.01316.30
7.2.290.0030.01316.30
7.2.00.0030.00919.43
7.1.100.0760.00416.44
7.1.70.0040.00416.97
7.1.60.0040.01119.19
7.1.00.0070.07322.28
7.0.200.0000.00916.70
7.0.60.0070.06721.80
7.0.50.0130.07317.90
7.0.40.0100.05320.21
7.0.30.0230.04720.19
7.0.20.0300.07020.13
7.0.10.0030.05020.06
7.0.00.0000.04720.07
5.6.280.0070.07021.11
5.6.210.0070.08720.52
5.6.200.0030.08018.24
5.6.190.0030.07020.63
5.6.180.0230.05020.46
5.6.170.0330.07720.58
5.6.160.0070.04320.50
5.6.150.0200.06018.25
5.6.140.0270.06318.18
5.6.130.0000.08018.28
5.6.120.0030.08321.15
5.6.110.0030.06321.00
5.6.100.0070.08321.13
5.6.90.0100.08721.02
5.6.80.0000.04320.44
5.5.350.0130.06020.41
5.5.340.0030.03717.98
5.5.330.0000.04720.13
5.5.320.0500.05320.27
5.5.310.0270.06020.49
5.5.300.0030.04318.08
5.5.290.0000.04718.04
5.5.280.0100.08020.67
5.5.270.0070.08720.86
5.5.260.0170.05720.91
5.5.250.0030.08320.80
5.5.240.0230.07020.28

preferences:
54.05 ms | 403 KiB | 5 Q