3v4l.org

run code in 300+ PHP versions simultaneously
<?php abstract class BaseRepo { abstract public function getModel(); public function find($id) { $model = $this->getModel(); return $model::find($id); } } class Model { public function find($id) { return [1,2,3]; } } class MRepo extends BaseRepo { public function getModel() { return Model; } } $o = new MRepo; var_dump($o->find(1));

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.0140.00318.55
8.3.50.0130.00921.99
8.3.40.0070.00718.84
8.3.30.0140.01018.82
8.3.20.0050.00320.28
8.3.10.0040.00420.66
8.3.00.0050.00221.93
8.2.180.0090.00618.41
8.2.170.0130.00322.96
8.2.160.0140.00022.11
8.2.150.0040.00424.18
8.2.140.0080.00324.66
8.2.130.0000.00821.03
8.2.120.0050.00326.35
8.2.110.0050.00522.26
8.2.100.0060.00617.84
8.2.90.0000.00817.75
8.2.80.0030.00718.04
8.2.70.0000.00818.04
8.2.60.0080.00017.93
8.2.50.0050.00318.10
8.2.40.0070.00020.60
8.2.30.0030.00519.42
8.2.20.0000.00717.61
8.2.10.0000.00717.93
8.2.00.0000.00718.05
8.1.280.0140.00425.92
8.1.270.0090.00922.09
8.1.260.0040.00428.09
8.1.250.0090.00628.09
8.1.240.0030.00623.97
8.1.230.0040.00819.04
8.1.220.0050.00317.77
8.1.210.0000.00818.77
8.1.200.0040.00417.22
8.1.190.0060.00317.23
8.1.180.0030.00518.10
8.1.170.0040.00418.45
8.1.160.0020.00520.87
8.1.150.0030.00618.91
8.1.140.0060.00319.49
8.1.130.0070.00017.75
8.1.120.0020.00517.36
8.1.110.0030.00617.51
8.1.100.0000.00717.47
8.1.90.0040.00417.50
8.1.80.0040.00417.45
8.1.70.0030.00317.40
8.1.60.0060.00317.52
8.1.50.0040.00417.57
8.1.40.0030.00517.52
8.1.30.0030.00517.58
8.1.20.0080.00017.47
8.1.10.0000.00817.52
8.1.00.0040.00417.39
8.0.300.0040.00419.82
8.0.290.0120.00016.58
8.0.280.0070.00018.44
8.0.270.0030.00317.37
8.0.260.0040.00417.16
8.0.250.0070.00017.05
8.0.240.0050.00417.03
8.0.230.0080.00016.92
8.0.220.0030.00616.86
8.0.210.0000.00716.83
8.0.200.0000.00716.88
8.0.190.0040.00417.06
8.0.180.0040.00416.97
8.0.170.0000.00816.87
8.0.160.0040.00417.06
8.0.150.0030.00316.84
8.0.140.0000.00716.92
8.0.130.0000.00613.33
8.0.120.0080.00016.91
8.0.110.0000.00717.00
8.0.100.0070.00016.95
8.0.90.0070.00316.82
8.0.80.0040.01117.00
8.0.70.0050.00316.93
8.0.60.0000.00716.96
8.0.50.0000.00716.80
8.0.30.0070.01116.89
8.0.20.0150.01017.40
8.0.10.0000.00816.91
8.0.00.0080.00916.90
7.4.330.0050.00016.78
7.4.320.0030.00316.50
7.4.300.0060.00016.50
7.4.290.0070.00016.60
7.4.280.0030.00616.60
7.4.270.0040.00716.49
7.4.260.0000.01016.49
7.4.250.0030.00616.49
7.4.240.0030.00316.55
7.4.230.0050.00316.70
7.4.220.0140.01316.46
7.4.210.0110.00416.54
7.4.200.0030.00516.63
7.4.160.0120.00916.57
7.4.150.0070.01417.40
7.4.140.0090.01217.86
7.4.130.0080.00916.52
7.4.120.0150.00616.44
7.4.110.0060.01116.56
7.4.100.0130.01016.63
7.4.90.0100.00716.57
7.4.80.0040.01519.39
7.4.70.0090.00616.50
7.4.60.0030.01316.41
7.4.50.0090.00616.59
7.4.40.0130.00516.58
7.4.30.0060.01116.36
7.4.10.0060.01314.69
7.4.00.0060.00814.89
7.3.330.0050.00013.36
7.3.320.0060.00013.34
7.3.310.0030.00316.25
7.3.300.0030.00316.24
7.3.290.0110.00516.38
7.3.280.0070.00916.35
7.3.270.0030.01417.40
7.3.260.0030.01316.57
7.3.250.0100.00816.40
7.3.240.0120.00716.41
7.3.230.0100.01316.39
7.3.210.0090.00916.41
7.3.200.0110.00716.41
7.3.190.0080.00816.38
7.3.180.0130.01016.38
7.3.170.0060.01616.39
7.3.160.0120.00316.33
7.3.130.0070.01015.05
7.3.120.0060.00714.84
7.3.110.0100.00714.84
7.3.100.0110.00314.74
7.3.90.0080.00814.82
7.3.80.0080.00514.71
7.3.70.0070.00514.83
7.3.60.0100.00314.81
7.3.50.0040.00614.94
7.3.40.0030.00914.87
7.3.30.0040.01114.58
7.3.20.0080.00716.62
7.3.10.0080.00916.73
7.3.00.0040.01116.83
7.2.330.0090.00916.67
7.2.320.0110.00716.84
7.2.310.0090.00916.70
7.2.300.0110.00716.44
7.2.290.0060.01016.72
7.2.260.0030.01314.96
7.2.250.0100.00715.00
7.2.240.0050.01114.85
7.2.230.0090.00715.02
7.2.220.0070.01014.94
7.2.210.0060.00815.02
7.2.200.0070.00614.98
7.2.190.0080.00715.04
7.2.180.0050.01114.94
7.2.170.0040.00914.77
7.2.160.0050.00714.90
7.2.150.0030.01316.96
7.2.140.0070.00516.67
7.2.130.0050.00716.97
7.2.120.0100.00716.78
7.2.110.0080.00316.97
7.2.100.0060.00616.89
7.2.90.0070.00916.91
7.2.80.0110.00516.75
7.2.70.0110.00316.92
7.2.60.0070.00616.88
7.2.50.0080.00716.94
7.2.40.0070.00716.88
7.2.30.0070.00716.95
7.2.20.0050.00716.84
7.2.10.0080.00817.02
7.2.00.0060.00916.75
7.1.330.0080.00715.95
7.1.320.0090.00615.98
7.1.310.0040.00915.97
7.1.300.0090.00615.66
7.1.290.0020.01215.85
7.1.280.0060.00715.83
7.1.270.0090.00515.88
7.1.260.0070.01015.55
7.1.250.0090.00415.94
7.1.240.0030.00615.80
7.1.230.0120.00315.68
7.1.220.0060.00615.77
7.1.210.0000.01315.72
7.1.200.0050.00615.76
7.1.190.0030.01215.88
7.1.180.0000.01215.88
7.1.170.0040.01215.66
7.1.160.0030.01015.70
7.1.150.0100.00315.86
7.1.140.0070.00315.90
7.1.130.0030.00915.89
7.1.120.0040.00815.72
7.1.110.0000.01515.76
7.1.100.0060.00915.84
7.1.90.0000.01515.97
7.1.80.0070.00715.86
7.1.70.0110.00516.24
7.1.60.0070.01417.48
7.1.50.0030.01516.34
7.1.40.0090.00315.80
7.1.30.0040.00815.60
7.1.20.0030.01015.79
7.1.10.0000.00915.86
7.1.00.0060.04018.96
7.0.330.0030.00915.41
7.0.320.0070.00415.54
7.0.310.0000.01715.30
7.0.300.0060.00615.38
7.0.290.0040.00715.42
7.0.280.0030.01015.34
7.0.270.0060.00615.17
7.0.260.0030.00615.45
7.0.250.0070.00715.38
7.0.240.0080.00315.37
7.0.230.0040.01115.31
7.0.220.0000.01515.60
7.0.210.0040.00715.51
7.0.200.0300.00615.18
7.0.190.0060.00315.60
7.0.180.0030.00915.52
7.0.170.0040.00915.55
7.0.160.0070.00715.25
7.0.150.0080.00315.54
7.0.140.0000.00915.25
7.0.130.0070.00415.22
7.0.120.0080.00315.55
7.0.110.0040.00715.46
7.0.100.0060.00615.33
7.0.90.0120.00315.28
7.0.80.0030.00615.22
7.0.70.0110.00615.18
7.0.60.0220.03717.69
7.0.50.0080.04316.65
7.0.40.0130.04016.92
7.0.30.0170.02516.98
7.0.20.0100.02516.89
7.0.10.0020.03616.93
7.0.00.0050.03016.94
5.6.400.0090.00014.35
5.6.390.0130.00014.42
5.6.380.0000.01414.29
5.6.370.0040.01114.27
5.6.360.0030.01014.68
5.6.350.0040.01214.53
5.6.340.0040.00714.46
5.6.330.0070.00714.45
5.6.320.0090.00914.34
5.6.310.0070.00314.36
5.6.300.0070.00714.46
5.6.290.0000.00914.61
5.6.280.0050.04017.86
5.6.270.0060.00914.27
5.6.260.0060.00614.16
5.6.250.0060.00614.30
5.6.240.0030.00914.22
5.6.230.0100.00314.62
5.6.220.0090.00614.61
5.6.210.0100.04017.55
5.6.200.0080.04216.29
5.6.190.0050.02517.38
5.6.180.0200.04217.38
5.6.170.0130.03217.32
5.6.160.0100.04517.38
5.6.150.0000.04116.28
5.6.140.0080.04016.37
5.6.130.0070.04516.36
5.6.120.0110.03017.69
5.6.110.0050.04217.58
5.6.100.0110.03217.67
5.6.90.0030.03317.84
5.6.80.0180.03217.40
5.6.70.0040.00413.99
5.6.60.0080.00814.11
5.6.50.0120.00314.30
5.6.40.0090.00614.30
5.6.30.0040.01114.48
5.6.20.0090.00614.13
5.6.10.0070.00714.30
5.6.00.0030.01014.33
5.5.380.0030.00614.54
5.5.370.0030.00914.30
5.5.360.0030.01414.28
5.5.350.0180.04817.28
5.5.340.0110.03716.05
5.5.330.0150.02317.36
5.5.320.0390.03017.25
5.5.310.0150.02417.30
5.5.300.0020.02916.21
5.5.290.0070.03816.05
5.5.280.0100.04417.36
5.5.270.0020.02617.42
5.5.260.0000.03017.58
5.5.250.0130.04117.47
5.5.240.0060.04317.08
5.5.230.0060.00314.30
5.5.220.0060.00614.17
5.5.210.0070.01014.16
5.5.200.0070.00714.06
5.5.190.0060.00614.10
5.5.180.0000.01314.07
5.5.170.0080.00314.16
5.5.160.0070.01014.32
5.5.150.0040.00813.90
5.5.140.0030.00613.91
5.5.130.0040.01114.00
5.5.120.0040.01114.18
5.5.110.0080.00314.11
5.5.100.0060.00913.77
5.5.90.0000.01514.08
5.5.80.0070.00713.98
5.5.70.0060.00614.06
5.5.60.0000.00813.89
5.5.50.0000.01713.94
5.5.40.0070.00414.14
5.5.30.0030.01314.08
5.5.20.0140.00014.01
5.5.10.0030.01314.18
5.5.00.0000.01114.17

preferences:
63.59 ms | 401 KiB | 5 Q