3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Shape { public function area() { return 0; } public function sides () { return 0; } } class Rectangle extends Shape { public function area($width,$length) { $area = $width*$length; echo $area . ", "; } public function sides() { } } class Circle extends Shape { public function area($radius,$pi) { $area = pow($radius, 2)*$pi; echo $area . ", "; } public function sides() { } } class Square extends Shape { public function area($side) { $area = pow($side, 2); echo $area; } } $s = new Rectangle(); $s->area(3,15); $c = new Circle(); $c->area(3,3.14); $q = new Square(); $q->area(3);

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.70.0110.00418.43
8.3.60.0090.00616.50
8.3.50.0100.00921.93
8.3.40.0120.00618.84
8.3.30.0180.00318.39
8.3.20.0040.00420.09
8.3.10.0000.00823.61
8.3.00.0040.00419.54
8.2.190.0120.00318.29
8.2.180.0060.01318.15
8.2.170.0120.00322.96
8.2.160.0100.00320.36
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0040.00419.38
8.2.120.0050.00326.35
8.2.110.0080.00019.36
8.2.100.0070.00717.66
8.2.90.0040.00419.11
8.2.80.0030.00517.97
8.2.70.0040.00417.38
8.2.60.0000.01017.80
8.2.50.0030.00618.10
8.2.40.0090.00022.14
8.2.30.0040.00420.61
8.2.20.0070.00017.52
8.2.10.0040.00417.95
8.2.00.0040.00417.93
8.1.280.0100.00725.92
8.1.270.0140.00420.43
8.1.260.0070.00028.09
8.1.250.0000.00728.09
8.1.240.0090.00022.05
8.1.230.0040.00717.51
8.1.220.0040.00417.74
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0000.00817.10
8.1.180.0060.00318.10
8.1.170.0040.00418.46
8.1.160.0000.00820.63
8.1.150.0070.00018.69
8.1.140.0030.00619.39
8.1.130.0070.00017.64
8.1.120.0040.00417.33
8.1.110.0060.00317.34
8.1.100.0000.00817.30
8.1.90.0000.00717.39
8.1.80.0060.00317.23
8.1.70.0070.00017.35
8.1.60.0040.00417.47
8.1.50.0000.00817.35
8.1.40.0040.00417.34
8.1.30.0040.00417.51
8.1.20.0030.00517.48
8.1.10.0050.00317.34
8.1.00.0000.00717.21
8.0.300.0090.00019.84
8.0.290.0030.00516.75
8.0.280.0070.00018.33
8.0.270.0030.00317.05
8.0.260.0030.00317.15
8.0.250.0030.00316.90
8.0.240.0030.00316.79
8.0.230.0000.00716.81
8.0.220.0020.00516.80
8.0.210.0030.00316.77
8.0.200.0030.00316.86
8.0.190.0080.00016.96
8.0.180.0070.00016.84
8.0.170.0040.00716.90
8.0.160.0050.00216.82
8.0.150.0030.00316.79
8.0.140.0040.00416.77
8.0.130.0080.00013.25
8.0.120.0000.00816.82
8.0.110.0080.00016.79
8.0.100.0040.00416.73
8.0.90.0000.00716.80
8.0.80.0100.00616.90
8.0.70.0000.00816.68
8.0.60.0040.00416.77
8.0.50.0000.00716.71
8.0.30.0090.01217.11
8.0.20.0100.01217.40
8.0.10.0050.00216.97
8.0.00.0110.00716.62
7.4.330.0000.00516.76
7.4.320.0060.00016.54
7.4.300.0060.00316.44
7.4.290.0030.00316.61
7.4.280.0030.00316.41
7.4.270.0070.00016.46
7.4.260.0030.00316.57
7.4.250.0040.00416.51
7.4.240.0060.00116.52
7.4.230.0030.00316.68
7.4.220.0090.00916.68
7.4.210.0080.00916.57
7.4.200.0030.00316.69
7.4.160.0030.01216.42
7.4.150.0120.00617.40
7.4.140.0210.01417.86
7.4.130.0100.00816.67
7.4.120.0140.00316.61
7.4.110.0100.00916.62
7.4.100.0160.00416.56
7.4.90.0130.00616.48
7.4.80.0150.00619.39
7.4.70.0100.00716.36
7.4.60.0110.00516.61
7.4.50.0070.00716.53
7.4.40.0040.01316.63
7.4.30.0080.00816.55
7.4.00.0040.01015.14
7.3.330.0030.00313.23
7.3.320.0000.00613.32
7.3.310.0000.00716.47
7.3.300.0000.00716.31
7.3.290.0000.00716.32
7.3.280.0090.00916.28
7.3.270.0090.00917.40
7.3.260.0150.00916.29
7.3.250.0100.00916.31
7.3.240.0100.00916.48
7.3.230.0180.00016.39
7.3.210.0160.00316.36
7.3.200.0080.00816.49
7.3.190.0100.00616.26
7.3.180.0070.01016.48
7.3.170.0080.01216.55
7.3.160.0130.00716.49
7.2.330.0030.01416.80
7.2.320.0140.00416.71
7.2.310.0090.00816.43
7.2.300.0000.01816.46
7.2.290.0030.01416.76
7.2.60.0130.00016.96
7.2.00.0040.00819.16
7.1.200.0090.00015.76
7.1.100.0040.00718.05
7.1.70.0050.00517.22
7.1.60.0100.01319.52
7.1.50.0120.00917.02
7.1.00.0000.07722.50
7.0.200.0040.00416.77
7.0.60.0030.04020.05
7.0.50.0130.07017.93
7.0.40.0070.04320.02
7.0.30.0430.07320.08
7.0.20.0170.05020.23
7.0.10.0100.08320.18
7.0.00.0100.04020.23
5.6.280.0030.06320.87
5.6.210.0100.07720.56
5.6.200.0030.04018.29
5.6.190.0100.09720.63
5.6.180.0370.07020.48
5.6.170.0370.06020.56
5.6.160.0070.08320.47
5.6.150.0130.05718.22
5.6.140.0000.04318.28
5.6.130.0070.05718.23
5.6.120.0100.04321.03
5.6.110.0030.08321.05
5.6.100.0000.04321.14
5.6.90.0030.05321.07
5.6.80.0100.07020.50
5.5.350.0270.07720.45
5.5.340.0000.04318.07
5.5.330.0000.06320.38
5.5.320.0170.04320.36
5.5.310.0200.04720.27
5.5.300.0130.06718.08
5.5.290.0030.04017.99
5.5.280.0170.07720.90
5.5.270.0070.03720.69
5.5.260.0000.08720.77
5.5.250.0100.07720.81
5.5.240.0230.03720.13

preferences:
48.13 ms | 401 KiB | 5 Q