3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { private $data; private $relations; public function __construct() { $this->data = ['foo' => 'test', 'body' => 'content']; } public function test() { $function = debug_backtrace()[1]['function']; $this->relations[$function] = ['a' =>'aa', 'b' =>'bb']; return $this; } } class bar extends foo{ public function aa(){ return $this->test(); } } $bar = new bar(); $bar->aa(); print_r($bar);

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.0070.00716.38
8.3.50.0000.01416.50
8.3.40.0090.00618.55
8.3.30.0090.00918.69
8.3.20.0030.00620.28
8.3.10.0040.00423.48
8.3.00.0060.00319.46
8.2.180.0110.00718.29
8.2.170.0130.00322.96
8.2.160.0070.00720.35
8.2.150.0080.00025.66
8.2.140.0040.00424.66
8.2.130.0000.00721.05
8.2.120.0070.00026.35
8.2.110.0040.00420.32
8.2.100.0100.00017.91
8.2.90.0030.00619.17
8.2.80.0080.00017.97
8.2.70.0050.00517.50
8.2.60.0000.00817.80
8.2.50.0060.00318.10
8.2.40.0000.00720.61
8.2.30.0000.00821.04
8.2.20.0040.00418.05
8.2.10.0050.00318.12
8.2.00.0000.00717.95
8.1.280.0030.01625.92
8.1.270.0040.00423.71
8.1.260.0080.00026.35
8.1.250.0030.00528.09
8.1.240.0060.00322.00
8.1.230.0110.00020.86
8.1.220.0050.00317.74
8.1.210.0000.00818.77
8.1.200.0060.00317.38
8.1.190.0040.00417.23
8.1.180.0050.00218.10
8.1.170.0080.00018.50
8.1.160.0020.00519.06
8.1.150.0040.00420.47
8.1.140.0040.00419.47
8.1.130.0040.00418.80
8.1.120.0070.00017.33
8.1.110.0060.00317.36
8.1.100.0000.00817.30
8.1.90.0040.00417.44
8.1.80.0030.00517.34
8.1.70.0080.00017.45
8.1.60.0060.00317.62
8.1.50.0050.00317.52
8.1.40.0040.00417.52
8.1.30.0030.00617.66
8.1.20.0090.00417.58
8.1.10.0000.00817.54
8.1.00.0040.00417.30
8.0.300.0020.00518.77
8.0.290.0040.00416.63
8.0.280.0000.00818.39
8.0.270.0080.00017.09
8.0.260.0070.00016.74
8.0.250.0000.00716.91
8.0.240.0040.00416.97
8.0.230.0040.00316.86
8.0.220.0070.00016.78
8.0.210.0070.00016.88
8.0.200.0030.00316.91
8.0.190.0000.01016.89
8.0.180.0000.00716.72
8.0.170.0030.00316.87
8.0.160.0000.00816.80
8.0.150.0000.00716.83
8.0.140.0040.00416.84
8.0.130.0000.00513.31
8.0.120.0000.00816.78
8.0.110.0080.00016.82
8.0.100.0000.00816.87
8.0.90.0070.00016.83
8.0.80.0030.01316.79
8.0.70.0040.00416.87
8.0.60.0040.00416.88
8.0.50.0050.00216.86
8.0.30.0120.00716.88
8.0.20.0060.01217.40
8.0.10.0000.00716.93
8.0.00.0090.00916.68
7.4.330.0020.00215.55
7.4.320.0000.00716.50
7.4.300.0000.00616.62
7.4.290.0030.00516.50
7.4.280.0000.00716.52
7.4.270.0030.00316.62
7.4.260.0060.00013.33
7.4.250.0000.01016.45
7.4.240.0000.00716.66
7.4.230.0000.00716.35
7.4.220.0120.00816.50
7.4.210.0130.00616.62
7.4.200.0050.00316.36
7.4.160.0090.00916.48
7.4.150.0160.00617.40
7.4.140.0080.01117.86
7.4.130.0130.01016.44
7.4.120.0110.00816.49
7.4.110.0090.00916.46
7.4.100.0060.01116.47
7.4.90.0120.00916.38
7.4.80.0180.00319.39
7.4.70.0100.00716.66
7.4.60.0110.01116.31
7.4.50.0080.00816.31
7.4.40.0040.01216.55
7.4.30.0080.00816.46
7.4.10.0100.00814.99
7.4.00.0080.00914.94
7.3.330.0050.00013.41
7.3.320.0030.00313.34
7.3.310.0000.00716.22
7.3.300.0000.00716.30
7.3.290.0050.00916.32
7.3.280.0080.00816.34
7.3.270.0130.00417.40
7.3.260.0070.01016.46
7.3.250.0090.00916.35
7.3.240.0100.00816.64
7.3.230.0110.00816.54
7.3.210.0100.00616.64
7.3.200.0140.00716.25
7.3.190.0080.01316.51
7.3.180.0070.01316.65
7.3.170.0100.01016.30
7.3.160.0070.00816.53
7.3.130.0120.00714.90
7.3.120.0050.01214.86
7.3.110.0050.01014.79
7.3.100.0030.01014.53
7.3.90.0120.00514.98
7.3.80.0050.00814.99
7.3.70.0070.00614.83
7.3.60.0040.00914.79
7.3.50.0030.01214.77
7.3.40.0020.00914.83
7.3.30.0050.00714.78
7.3.20.0030.01016.65
7.3.10.0070.00816.56
7.3.00.0060.00916.50
7.2.330.0090.00916.57
7.2.320.0030.01316.58
7.2.310.0070.01016.41
7.2.300.0030.01316.73
7.2.290.0060.01016.85
7.2.260.0070.01115.04
7.2.250.0070.01214.96
7.2.240.0080.01014.81
7.2.230.0070.00714.84
7.2.220.0090.00715.22
7.2.210.0060.00915.05
7.2.200.0030.01014.81
7.2.190.0070.00914.95
7.2.180.0070.00615.03
7.2.170.0020.01114.92
7.2.160.0070.00815.04
7.2.150.0100.00416.94
7.2.140.0050.01016.76
7.2.130.0040.01017.00
7.2.120.0050.01116.84
7.2.110.0050.01116.87
7.2.100.0030.01016.91
7.2.90.0070.00816.15
7.2.80.0410.00716.06
7.2.70.0470.01016.27
7.2.60.0040.01416.04
7.2.50.0160.00716.19
7.2.40.0060.00816.14
7.2.30.0620.00816.35
7.2.20.0770.00616.22
7.2.10.0090.01516.03
7.2.00.0410.00616.20
7.1.330.0040.00915.69
7.1.320.0070.00715.73
7.1.310.0050.00815.81
7.1.300.0090.00415.79
7.1.290.0070.00515.86
7.1.280.0060.00815.71
7.1.270.0020.00915.77
7.1.260.0050.00815.81
7.1.250.0050.00715.69
7.1.240.0050.00815.95
7.1.230.0050.00915.83
7.1.220.0040.01315.75
7.1.210.0050.00715.31
7.1.200.0100.00415.11
7.1.190.0060.00915.18
7.1.180.0360.00715.06
7.1.170.0080.00515.15
7.1.160.0070.00815.22
7.1.150.0660.00415.17
7.1.140.0280.00814.99
7.1.130.0060.01015.14
7.1.120.0050.00915.20
7.1.110.0210.00915.16
7.1.100.0080.00515.29
7.1.90.0050.01015.33
7.1.80.0600.01115.06
7.1.70.0590.00815.18
7.1.60.0160.00621.22
7.1.50.0070.01121.08
7.1.40.0160.00721.20
7.1.30.0140.01021.10
7.1.20.0470.00921.19
7.1.10.0080.00815.07
7.1.00.0050.00815.22
7.0.330.0050.00415.26
7.0.320.0060.00715.42
7.0.310.0030.01014.86
7.0.300.0560.00514.80
7.0.290.0060.00714.73
7.0.280.0890.00814.74
7.0.270.0060.00714.84
7.0.260.0060.00714.70
7.0.250.0060.00815.00
7.0.240.0900.00914.75
7.0.230.0130.00614.87
7.0.220.0070.01114.79
7.0.210.0170.00814.93
7.0.200.0100.00414.81
7.0.190.1270.01014.81
7.0.180.0080.00714.76
7.0.170.0060.01014.93
7.0.160.0150.00714.83
7.0.150.0240.00514.84
7.0.140.0320.01014.81
7.0.130.0240.00914.68
7.0.120.0200.00814.89
7.0.110.0120.00814.67
7.0.100.0050.01014.86
7.0.90.0260.00714.85
7.0.80.0070.01014.80
7.0.70.0090.00714.85
7.0.60.0080.00714.94
7.0.50.0080.00614.91
7.0.40.0540.00713.45
7.0.30.0130.00713.58
7.0.20.0080.00613.51
7.0.10.0050.01013.58
7.0.00.0490.00413.44
5.6.400.0030.01014.53
5.6.390.0050.01114.59
5.6.380.0070.00414.32
5.6.370.0030.01214.42
5.6.360.0090.00614.52
5.6.350.0080.00814.49
5.6.340.0060.00614.54
5.6.330.0030.01114.49
5.6.320.0080.00814.45
5.6.310.0080.00514.55
5.6.300.0070.00314.50
5.6.290.0050.00514.47
5.6.280.0000.01014.44
5.6.270.0080.00414.41
5.6.260.0020.01014.47
5.6.250.0040.00914.47
5.6.240.0050.01014.51
5.6.230.0030.00714.64
5.6.220.0020.01214.47
5.6.210.0080.00514.53
5.6.200.0070.00514.53
5.6.190.0030.01014.32
5.6.180.0090.00414.49
5.6.170.0080.00814.61
5.6.160.0070.00214.48
5.6.150.0030.00814.39
5.6.140.0030.00914.46
5.6.130.0060.01014.40
5.6.120.0030.00714.53
5.6.110.0040.00914.56
5.6.100.0050.01014.57
5.6.90.0020.00714.40
5.6.80.0040.00514.28
5.6.70.0040.01014.44
5.6.60.0070.00714.39
5.6.50.0060.01014.38
5.6.40.0060.00814.41
5.6.30.0080.00714.43
5.6.20.0040.00714.29
5.6.10.0010.01014.61
5.6.00.0050.00614.37

preferences:
44.85 ms | 400 KiB | 5 Q