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.0110.00922.11
8.3.40.0070.01418.78
8.3.30.0100.00618.64
8.3.20.0000.00820.07
8.3.10.0000.00820.56
8.3.00.0040.00421.90
8.2.180.0070.00718.43
8.2.170.0150.00022.96
8.2.160.0070.00719.32
8.2.150.0000.00824.18
8.2.140.0050.00524.66
8.2.130.0000.00826.16
8.2.120.0080.00020.93
8.2.110.0070.00322.29
8.2.100.0090.00317.78
8.2.90.0050.00317.75
8.2.80.0060.00617.97
8.2.70.0040.00417.80
8.2.60.0000.00817.80
8.2.50.0040.00418.10
8.2.40.0040.00420.41
8.2.30.0070.00319.36
8.2.20.0000.00717.82
8.2.10.0000.00718.06
8.2.00.0030.00317.91
8.1.280.0170.00325.92
8.1.270.0090.00922.18
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00323.92
8.1.230.0110.00019.23
8.1.220.0050.00317.74
8.1.210.0000.00918.77
8.1.200.0030.00617.35
8.1.190.0080.00017.23
8.1.180.0080.00018.10
8.1.170.0000.00818.46
8.1.160.0020.00520.59
8.1.150.0040.00418.82
8.1.140.0030.00519.51
8.1.130.0030.00617.51
8.1.120.0000.00717.44
8.1.110.0030.00617.35
8.1.100.0040.00417.29
8.1.90.0040.00417.29
8.1.80.0000.00717.36
8.1.70.0070.00017.41
8.1.60.0000.00717.63
8.1.50.0040.00417.55
8.1.40.0030.00517.39
8.1.30.0000.00817.69
8.1.20.0000.00817.49
8.1.10.0080.00017.58
8.1.00.0040.00417.48
8.0.300.0060.00319.73
8.0.290.0080.00416.58
8.0.280.0000.00718.29
8.0.270.0000.00717.07
8.0.260.0030.00317.09
8.0.250.0030.00316.86
8.0.240.0030.00616.95
8.0.230.0040.00416.89
8.0.220.0000.01116.73
8.0.210.0000.00816.91
8.0.200.0030.00317.00
8.0.190.0060.00316.97
8.0.180.0040.00416.95
8.0.170.0080.00016.81
8.0.160.0080.00016.94
8.0.150.0040.00416.82
8.0.140.0070.00016.80
8.0.130.0070.00013.35
8.0.120.0000.00716.77
8.0.110.0050.00216.81
8.0.100.0030.00516.72
8.0.90.0050.00316.92
8.0.80.0000.01516.82
8.0.70.0040.00416.75
8.0.60.0000.00716.78
8.0.50.0000.00716.85
8.0.30.0120.00617.06
8.0.20.0060.01417.40
8.0.10.0030.00417.00
8.0.00.0100.00816.63
7.4.330.0050.00016.70
7.4.320.0030.00316.52
7.4.300.0040.00416.63
7.4.290.0030.00316.51
7.4.280.0050.00216.45
7.4.270.0030.00616.50
7.4.260.0000.01216.56
7.4.250.0040.00416.38
7.4.240.0040.00416.43
7.4.230.0070.00016.48
7.4.220.0080.01916.46
7.4.210.0030.01016.53
7.4.200.0000.00716.70
7.4.160.0120.00416.68
7.4.150.0120.00717.40
7.4.140.0070.01317.86
7.4.130.0060.01316.51
7.4.120.0130.00616.49
7.4.110.0030.01416.78
7.4.100.0040.01216.57
7.4.90.0120.00616.58
7.4.80.0080.00819.39
7.4.70.0100.00516.43
7.4.60.0120.00316.64
7.4.50.0080.01116.73
7.4.40.0110.00616.23
7.4.30.0070.01016.50
7.4.10.0000.01415.16
7.4.00.0050.01214.99
7.3.330.0060.00013.43
7.3.320.0050.00013.38
7.3.310.0070.00016.39
7.3.300.0000.00616.25
7.3.290.0100.00716.37
7.3.280.0120.00816.36
7.3.270.0120.00617.40
7.3.260.0070.01116.52
7.3.250.0140.00616.32
7.3.240.0070.01016.46
7.3.230.0100.00716.52
7.3.210.0150.00716.27
7.3.200.0080.01616.59
7.3.190.0120.00916.34
7.3.180.0090.01216.45
7.3.170.0130.00616.34
7.3.160.0080.00816.39
7.3.130.0100.00714.84
7.3.120.0100.00714.94
7.3.110.0060.00914.82
7.3.100.0070.00714.67
7.3.90.0090.00015.02
7.3.80.0000.01414.74
7.3.70.0090.00614.66
7.3.60.0110.00314.79
7.3.50.0070.00714.96
7.3.40.0040.00714.64
7.3.30.0030.00614.76
7.3.20.0070.00416.55
7.3.10.0120.00316.53
7.3.00.0060.00316.51
7.2.330.0120.01216.77
7.2.320.0100.00616.68
7.2.310.0060.01816.38
7.2.300.0060.01116.65
7.2.290.0100.00616.64
7.2.260.0110.00714.96
7.2.250.0040.01114.66
7.2.240.0090.00315.05
7.2.230.0030.01214.91
7.2.220.0060.01314.72
7.2.210.0000.01815.08
7.2.200.0110.00314.89
7.2.190.0070.01014.99
7.2.180.0130.00314.84
7.2.170.0070.00714.97
7.2.160.0070.00714.74
7.2.150.0030.01016.71
7.2.140.0070.00716.64
7.2.130.0080.00316.87
7.2.120.0070.00416.78
7.2.110.0090.00016.96
7.2.100.0030.00816.57
7.2.90.0030.01016.81
7.2.80.0040.00716.70
7.2.70.0100.00716.92
7.2.60.0080.00916.83
7.2.50.0070.01116.98
7.2.40.0030.01216.80
7.2.30.0030.01016.86
7.2.20.0060.00616.81
7.2.10.0100.00316.86
7.2.00.0050.00717.98
7.1.330.0060.00615.85
7.1.320.0030.00615.71
7.1.310.0060.00815.79
7.1.300.0000.01215.66
7.1.290.0040.01115.48
7.1.280.0060.00615.71
7.1.270.0090.00315.60
7.1.260.0030.00615.71
7.1.250.0000.01415.79
7.1.240.0070.00715.73
7.1.230.0110.00415.65
7.1.220.0040.00815.66
7.1.210.0040.00815.73
7.1.200.0020.01215.78
7.1.190.0060.00615.70
7.1.180.0110.00415.77
7.1.170.0070.01015.84
7.1.160.0070.01015.64
7.1.150.0000.01415.65
7.1.140.0070.00715.91
7.1.130.0040.01115.65
7.1.120.0030.00615.91
7.1.110.0030.00716.01
7.1.100.0090.00817.02
7.1.90.0060.01015.72
7.1.80.0030.01715.79
7.1.70.0040.01416.53
7.1.60.0070.01117.59
7.1.50.0050.00716.37
7.1.40.0070.01015.76
7.1.30.0030.01515.80
7.1.20.0060.00315.63
7.1.10.0040.00815.90
7.1.00.0030.04119.11
7.0.330.0070.00315.35
7.0.320.0030.00915.50
7.0.310.0030.00715.32
7.0.300.0030.00615.28
7.0.290.0040.00915.43
7.0.280.0080.00015.44
7.0.270.0070.00715.41
7.0.260.0080.00415.15
7.0.250.0040.00715.22
7.0.240.0040.00715.31
7.0.230.0060.01315.41
7.0.220.0070.00415.25
7.0.210.0030.00615.59
7.0.200.0330.00714.80
7.0.190.0110.00415.07
7.0.180.0030.01315.30
7.0.170.0030.00615.36
7.0.160.0040.00815.57
7.0.150.0100.00315.36
7.0.140.0070.00715.40
7.0.130.0060.00615.56
7.0.120.0100.00315.49
7.0.110.0070.00715.09
7.0.100.0030.01315.38
7.0.90.0080.00415.18
7.0.80.0030.01015.45
7.0.70.0040.01215.50
7.0.60.0240.03817.66
7.0.50.0080.04216.74
7.0.40.0050.02816.86
7.0.30.0100.02816.93
7.0.20.0100.02516.90
7.0.10.0050.04516.93
7.0.00.0070.04016.94
5.6.400.0080.00314.18
5.6.390.0090.00414.46
5.6.380.0100.00314.36
5.6.370.0000.01414.34
5.6.360.0070.00714.41
5.6.350.0100.00314.38
5.6.340.0040.00414.45
5.6.330.0000.01414.26
5.6.320.0070.00714.14
5.6.310.0080.00813.99
5.6.300.0070.00714.53
5.6.290.0030.01214.56
5.6.280.0050.04217.77
5.6.270.0090.00014.45
5.6.260.0070.00414.21
5.6.250.0030.01214.09
5.6.240.0100.00714.43
5.6.230.0130.00314.33
5.6.220.0130.00314.11
5.6.210.0070.04017.42
5.6.200.0120.04316.14
5.6.190.0030.03317.38
5.6.180.0170.02817.48
5.6.170.0180.03317.51
5.6.160.0080.02317.48
5.6.150.0070.02416.28
5.6.140.0060.04216.15
5.6.130.0070.04016.37
5.6.120.0030.02517.73
5.6.110.0080.04217.55
5.6.100.0110.04117.64
5.6.90.0070.02717.58
5.6.80.0080.04217.23
5.6.70.0030.00814.46
5.6.60.0050.00514.39
5.6.50.0040.01114.14
5.6.40.0110.00314.30
5.6.30.0110.00414.16
5.6.20.0090.00914.46
5.6.10.0030.00914.31
5.6.00.0000.01614.27
5.5.380.0060.00614.15
5.5.370.0070.00714.23
5.5.360.0100.00313.98
5.5.350.0130.02517.13
5.5.340.0050.03816.21
5.5.330.0030.03717.54
5.5.320.0270.02517.35
5.5.310.0200.03417.30
5.5.300.0030.03716.16
5.5.290.0120.03316.15
5.5.280.0090.03117.62
5.5.270.0070.02317.64
5.5.260.0050.02617.45
5.5.250.0050.04017.59
5.5.240.0040.04217.08
5.5.230.0030.01314.31
5.5.220.0000.01514.25
5.5.210.0060.00913.93
5.5.200.0130.00314.39
5.5.190.0050.00514.08
5.5.180.0100.00013.86
5.5.170.0040.01114.37
5.5.160.0100.00613.81
5.5.150.0090.00614.20
5.5.140.0100.00614.26
5.5.130.0060.01214.48
5.5.120.0060.00613.94
5.5.110.0030.00614.37
5.5.100.0000.00914.18
5.5.90.0000.01713.81
5.5.80.0030.01414.03
5.5.70.0000.01014.25
5.5.60.0040.00413.95
5.5.50.0040.00713.67
5.5.40.0040.00414.30
5.5.30.0070.00713.98
5.5.20.0000.01214.29
5.5.10.0130.00314.02
5.5.00.0060.00913.79

preferences:
47.01 ms | 401 KiB | 5 Q