3v4l.org

run code in 300+ PHP versions simultaneously
<?php declare(strict_types=1); interface I { public function example(); } class A implements I { public function example(): int { return 123; } // compatible with I::example } class B extends A { public function example(): string { return "string"; } // compatible with I::example } function accepts_i_expects_any(I $i) { var_dump($i->example()); } accepts_i_expects_any(new B); // receives string, no problem function accepts_a_expects_int(A $a) { var_dump($a->example()); } accepts_a_expects_int(new B); // receives string, problem

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.40.0110.00418.77
8.3.30.0060.00918.43
8.3.20.0050.00323.64
8.3.10.0070.00021.83
8.3.00.0050.00319.13
8.2.170.0070.00722.96
8.2.160.0150.00620.35
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0030.00517.97
8.2.120.0040.00426.35
8.2.110.0080.00320.97
8.2.100.0080.00417.66
8.2.90.0080.00017.84
8.2.80.0030.00617.97
8.2.70.0050.00317.88
8.2.60.0000.00718.09
8.2.50.0030.00618.10
8.2.40.0040.00422.31
8.2.30.0040.00419.09
8.2.20.0040.00418.02
8.2.10.0000.00817.91
8.2.00.0040.00417.66
8.1.270.0050.00523.93
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0000.00823.78
8.1.230.0070.00421.03
8.1.220.0050.00317.74
8.1.210.0000.00819.04
8.1.200.0060.00317.23
8.1.190.0000.00917.22
8.1.180.0050.00318.10
8.1.170.0000.00818.84
8.1.160.0000.00718.82
8.1.150.0030.00320.21
8.1.140.0040.00419.38
8.1.130.0050.00317.37
8.1.120.0040.00417.29
8.1.110.0050.00217.35
8.1.100.0020.00517.41
8.1.90.0030.00417.33
8.1.80.0020.00517.40
8.1.70.0000.00717.32
8.1.60.0000.00717.57
8.1.50.0060.00317.37
8.1.40.0040.00417.46
8.1.30.0000.00817.51
8.1.20.0030.00617.58
8.1.10.0000.00817.37
8.1.00.0030.00617.25
8.0.300.0000.00719.73
8.0.290.0040.00416.75
8.0.280.0040.00418.45
8.0.270.0000.00717.11
8.0.260.0000.00620.12
8.0.250.0030.00316.85
8.0.240.0070.00016.92
8.0.230.0000.00816.85
8.0.220.0030.00516.87
8.0.210.0040.00416.89
8.0.200.0000.00616.96
8.0.190.0050.00216.91
8.0.180.0000.00816.79
8.0.170.0050.00316.95
8.0.160.0000.00716.84
8.0.150.0030.00316.82
8.0.140.0040.00416.79
8.0.130.0000.00613.23
8.0.120.0000.00716.73
8.0.110.0040.00416.75
8.0.100.0080.00016.75
8.0.90.0040.00416.99
8.0.80.0100.00716.85
8.0.70.0070.00016.71
8.0.60.0000.00716.92
8.0.50.0050.00316.79
8.0.30.0070.01116.90
8.0.20.0110.00817.40
8.0.10.0050.00316.98
8.0.00.0080.00916.57
7.4.330.0000.00415.55
7.4.320.0000.00616.35
7.4.300.0030.00316.53
7.4.290.0000.00716.53
7.4.280.0070.00316.36
7.4.270.0030.00316.44
7.4.260.0060.00316.40
7.4.250.0030.00316.48
7.4.240.0040.00416.43
7.4.230.0030.00416.31
7.4.220.0160.01016.29
7.4.210.0040.01116.46
7.4.200.0000.00716.55
7.4.160.0090.00916.35
7.4.150.0110.01417.40
7.4.140.0120.00917.86
7.4.130.0090.00916.41
7.4.120.0100.00916.57
7.4.110.0070.01016.54
7.4.100.0000.01716.59
7.4.90.0040.01216.32
7.4.80.0080.00919.39
7.4.70.0060.00916.45
7.4.60.0080.00816.44
7.4.50.0100.00316.56
7.4.40.0100.01016.57
7.4.30.0040.01216.32
7.4.00.0060.00614.77
7.3.330.0030.00313.11
7.3.320.0050.00013.16
7.3.310.0030.00316.17
7.3.300.0070.00016.17
7.3.290.0070.01016.34
7.3.280.0080.00916.30
7.3.270.0100.00717.40
7.3.260.0110.00616.60
7.3.250.0100.01116.32
7.3.240.0100.01216.32
7.3.230.0090.00916.38
7.3.210.0140.00716.43
7.3.200.0090.01216.26
7.3.190.0100.01116.25
7.3.180.0060.01216.53
7.3.170.0060.01216.32
7.3.160.0100.00716.54
7.3.10.0060.00916.56
7.3.00.0050.00916.57
7.2.330.0080.00916.55
7.2.320.0110.00916.43
7.2.310.0080.00916.31
7.2.300.0090.01016.25
7.2.290.0090.00916.42
7.2.130.0060.00816.64
7.2.120.0060.00716.85
7.2.110.0070.00416.69
7.2.100.0020.01116.69
7.2.90.0040.00616.82
7.2.80.0090.00716.81
7.2.70.0020.01216.78
7.2.60.0050.00816.74
7.2.50.0080.00416.77
7.2.40.0050.00916.72
7.2.30.0020.01116.81
7.2.20.0060.01016.71
7.2.10.0070.00516.80
7.2.00.0080.00216.74
7.1.250.0080.00515.67
7.1.200.0080.00815.84
7.1.70.0040.00416.88
7.1.60.0040.00816.77
7.1.50.0100.00616.94
7.1.10.0100.07022.07
7.1.00.0000.0009.19
7.0.200.0110.01116.62
7.0.150.0130.05321.90
7.0.140.0100.06721.77
7.0.130.0070.07722.00
7.0.120.0130.07321.74
7.0.110.0130.06021.80
7.0.100.0100.07321.91
7.0.90.0130.07721.84
7.0.80.0100.08021.93
7.0.70.0130.07321.85
7.0.60.0030.08021.97
7.0.50.0170.07321.90
7.0.40.0070.06321.91
7.0.30.0070.06021.86
7.0.20.0030.06021.82
7.0.10.0130.05721.86
7.0.00.0100.06021.89

preferences:
58.97 ms | 400 KiB | 5 Q