3v4l.org

run code in 300+ PHP versions simultaneously
<?php trait DataCollector { static $CollectionData = array(); static function setData( $data ) { self::$CollectionData[] = $data; } static function getCollectedData() { return self::$CollectionData; } } class Form {} class Field extends Form { use DataCollector; public function __construct( $type, $text = NULL ) { self::setData( $type ); } } $Field1 = new Field( 'text' ); var_dump( $Field1->getCollectedData() ); $Field2 = new Field( 'html', 'hello' ); var_dump( $Field2->getCollectedData() );

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.0070.00718.43
8.3.60.0120.00318.18
8.3.50.0120.00721.21
8.3.40.0140.00718.82
8.3.30.0120.00318.67
8.3.20.0040.00418.57
8.3.10.0040.00420.97
8.3.00.0060.00323.44
8.2.180.0160.00318.16
8.2.170.0140.00722.96
8.2.160.0110.00820.39
8.2.150.0050.00324.18
8.2.140.0050.00324.66
8.2.130.0070.00726.16
8.2.120.0030.00719.77
8.2.110.0100.00020.38
8.2.100.0080.00417.91
8.2.90.0040.00419.30
8.2.80.0000.00817.97
8.2.70.0000.00917.50
8.2.60.0080.00018.00
8.2.50.0000.00818.07
8.2.40.0000.00818.16
8.2.30.0040.00421.12
8.2.20.0040.00417.63
8.2.10.0070.00017.74
8.2.00.0000.00817.79
8.1.280.0090.00625.92
8.1.270.0100.00023.99
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0060.00322.46
8.1.230.0080.00420.88
8.1.220.0060.00318.77
8.1.210.0080.00018.86
8.1.200.0030.00617.36
8.1.190.0040.00417.65
8.1.180.0050.00318.10
8.1.170.0000.00818.46
8.1.160.0000.00818.80
8.1.150.0000.00718.64
8.1.140.0040.00417.46
8.1.130.0070.00017.73
8.1.120.0030.00517.45
8.1.110.0040.00417.46
8.1.100.0030.00517.45
8.1.90.0040.00417.39
8.1.80.0000.00717.41
8.1.70.0030.00317.37
8.1.60.0030.00617.47
8.1.50.0000.00717.45
8.1.40.0080.00017.43
8.1.30.0040.00417.54
8.1.20.0060.00317.64
8.1.10.0040.00417.47
8.1.00.0070.00017.36
8.0.300.0030.00619.85
8.0.290.0000.00717.16
8.0.280.0030.00318.35
8.0.270.0070.00017.16
8.0.260.0000.00816.69
8.0.250.0000.00716.93
8.0.240.0030.00516.95
8.0.230.0050.00317.00
8.0.220.0000.00916.79
8.0.210.0050.00516.93
8.0.200.0030.00316.84
8.0.190.0000.00916.91
8.0.180.0040.00416.92
8.0.170.0000.00716.87
8.0.160.0000.00716.95
8.0.150.0030.00316.82
8.0.140.0040.00716.91
8.0.130.0030.00313.36
8.0.120.0000.00716.85
8.0.110.0040.00416.71
8.0.100.0000.00816.71
8.0.90.0040.00416.76
8.0.80.0110.00416.87
8.0.70.0100.00016.83
8.0.60.0040.00416.84
8.0.50.0060.00316.93
8.0.30.0130.01317.25
8.0.20.0100.01017.40
8.0.10.0000.00716.99
8.0.00.0080.01016.83
7.4.330.0020.00214.83
7.4.320.0030.00316.65
7.4.300.0000.00616.43
7.4.290.0000.00716.55
7.4.280.0030.00316.48
7.4.270.0000.00816.53
7.4.260.0000.00513.28
7.4.250.0050.00316.41
7.4.240.0070.00016.48
7.4.230.0030.00316.41
7.4.220.0150.00716.37
7.4.210.0070.00816.55
7.4.200.0000.00716.43
7.4.190.0000.00716.65
7.4.160.0140.00316.56
7.4.150.0090.00917.40
7.4.140.0100.00917.86
7.4.130.0120.00816.52
7.4.120.0140.00316.49
7.4.110.0090.00816.55
7.4.100.0150.00316.39
7.4.90.0060.01816.25
7.4.80.0090.00919.39
7.4.70.0030.01316.46
7.4.60.0090.00916.57
7.4.50.0080.00016.54
7.4.40.0090.00322.52
7.4.30.0030.01316.71
7.4.00.0080.00515.13
7.3.330.0000.00513.16
7.3.320.0000.00613.29
7.3.310.0000.00716.34
7.3.300.0000.00716.29
7.3.290.0000.01516.29
7.3.280.0080.01016.33
7.3.270.0070.01117.40
7.3.260.0140.00618.24
7.3.250.0130.00816.39
7.3.240.0120.00416.32
7.3.230.0090.00916.39
7.3.210.0180.00316.55
7.3.200.0080.00819.39
7.3.190.0030.01416.60
7.3.180.0040.01116.52
7.3.170.0110.00516.27
7.3.160.0160.00316.39
7.3.120.0070.01014.50
7.2.330.0310.03016.75
7.2.320.0160.00616.68
7.2.310.0000.01816.57
7.2.300.0070.01016.70
7.2.290.0120.00916.53
7.2.00.0000.01819.11
7.1.100.0050.00518.13
7.1.70.0030.00516.88
7.1.60.0120.01219.40
7.1.50.0070.01016.99
7.1.00.0030.07322.27
7.0.200.0060.00316.58
7.0.140.0000.07721.93
7.0.110.0100.07319.97
7.0.100.0270.07020.04
7.0.90.0070.08320.06
7.0.80.0200.07019.84
7.0.70.0030.09019.96
7.0.60.0130.08020.00
7.0.50.0130.07720.40
7.0.40.0000.07020.12
7.0.30.0070.07720.03
7.0.20.0130.07320.18
7.0.10.0030.05320.14
7.0.00.0070.08320.04
5.6.280.0070.07321.13
5.6.250.0030.08020.88
5.6.240.0100.07720.57
5.6.230.0100.08020.66
5.6.220.0130.07720.67
5.6.210.0070.08320.73
5.6.200.0130.07321.16
5.6.190.0230.06321.29
5.6.180.0070.08021.20
5.6.170.0070.06321.29
5.6.160.0130.07721.14
5.6.150.0070.08021.15
5.6.140.0100.08321.14
5.6.130.0130.07021.14
5.6.120.0000.09021.15
5.6.110.0070.07021.26
5.6.100.0100.07721.07
5.6.90.0130.08321.00
5.6.80.0070.07720.34
5.6.70.0100.07320.36
5.6.60.0130.07320.45
5.6.50.0130.07020.32
5.6.40.0030.08720.50
5.6.30.0070.04720.32
5.6.20.0070.07320.48
5.6.10.0130.06720.46
5.6.00.0030.08320.29
5.5.380.0070.08020.32
5.5.370.0030.08720.54
5.5.360.0130.08020.56
5.5.350.0030.08720.50
5.5.340.0130.07020.97
5.5.330.0030.08020.96
5.5.320.0070.08320.97
5.5.310.0070.08020.89
5.5.300.0130.07321.02
5.5.290.0070.08020.75
5.5.280.0100.08320.79
5.5.270.0000.08720.81
5.5.260.0100.07320.77
5.5.250.0070.08020.65
5.5.240.0100.08020.29
5.5.230.0100.07320.25
5.5.220.0070.07320.23
5.5.210.0100.07720.19
5.5.200.0130.07320.26
5.5.190.0130.07320.12
5.5.180.0070.07720.26
5.5.160.0070.08020.30
5.5.150.0170.06320.12
5.5.140.0130.05020.38
5.5.130.0200.05720.19
5.5.120.0130.07320.09
5.5.110.0070.07320.05
5.5.100.0070.07320.22
5.5.90.0100.04020.20
5.5.80.0030.08319.98
5.5.70.0130.07720.14
5.5.60.0070.08020.00
5.5.50.0030.07720.16
5.5.40.0070.08019.97
5.5.30.0170.05020.07
5.5.20.0130.06320.20
5.5.10.0130.07320.24
5.5.00.0130.07720.05
5.4.450.0000.08719.31
5.4.440.0170.07319.57
5.4.430.0100.07719.35
5.4.420.0100.05019.35
5.4.410.0130.07319.53
5.4.400.0100.07719.14
5.4.390.0170.06019.01
5.4.380.0170.07019.14
5.4.370.0070.07719.16
5.4.360.0100.06319.01
5.4.350.0100.07019.02
5.4.340.0070.06719.17
5.4.320.0070.07319.14
5.4.310.0030.05319.24
5.4.300.0130.06719.31
5.4.290.0130.07018.98
5.4.280.0070.06318.98
5.4.270.0100.06319.33
5.4.260.0030.04719.18
5.4.250.0030.07719.18
5.4.240.0070.08019.02
5.4.230.0100.05718.98
5.4.220.0070.07019.24
5.4.210.0130.05019.08
5.4.200.0070.07319.30
5.4.190.0000.08019.00
5.4.180.0070.08019.22
5.4.170.0100.07319.33
5.4.160.0030.06319.16
5.4.150.0130.07019.16
5.4.140.0000.08016.64
5.4.130.0070.05016.38
5.4.120.0070.06716.58
5.4.110.0030.05316.60
5.4.100.0170.04016.64
5.4.90.0030.07016.58
5.4.80.0100.07016.59
5.4.70.0100.07016.54
5.4.60.0030.07016.57
5.4.50.0070.06716.52
5.4.40.0030.06716.57
5.4.30.0100.06716.62
5.4.20.0070.05316.32
5.4.10.0130.03016.44
5.4.00.0070.04015.80
5.3.290.0030.07714.61
5.3.280.0100.07014.54
5.3.270.0070.06314.44
5.3.260.0100.07014.43
5.3.250.0130.06314.53
5.3.240.0070.07014.61
5.3.230.0030.05314.66
5.3.220.0030.06014.56
5.3.210.0000.06014.52
5.3.200.0100.06714.51
5.3.190.0070.07314.66
5.3.180.0100.07014.50
5.3.170.0100.04014.45
5.3.160.0030.04714.49
5.3.150.0130.06014.55
5.3.140.0070.07714.55
5.3.130.0070.05014.38
5.3.120.0070.03714.56
5.3.110.0000.04314.61
5.3.100.0030.05713.96
5.3.90.0170.05314.04
5.3.80.0070.03713.91
5.3.70.0000.05313.94
5.3.60.0030.03713.96
5.3.50.0000.04013.77
5.3.40.0030.03313.80
5.3.30.0070.03713.75
5.3.20.0070.03313.57
5.3.10.0030.03313.54
5.3.00.0100.06313.54
5.2.170.0070.03711.13
5.2.160.0000.03011.03
5.2.150.0070.06011.07
5.2.140.0030.02711.09
5.2.130.0100.04311.17
5.2.120.0000.03011.11
5.2.110.0030.05011.04
5.2.100.0030.03011.00
5.2.90.0070.02311.26
5.2.80.0000.03711.16
5.2.70.0030.04010.99
5.2.60.0070.02710.97
5.2.50.0070.04310.96
5.2.40.0030.03011.15
5.2.30.0000.03710.96
5.2.20.0030.02710.88
5.2.10.0070.02011.08
5.2.00.0100.03010.60
5.1.60.0030.0279.89
5.1.50.0000.0309.90
5.1.40.0130.04310.03
5.1.30.0000.03010.19
5.1.20.0030.05010.24
5.1.10.0100.03310.12
5.1.00.0000.03010.01
5.0.50.0000.0238.38
5.0.40.0000.0278.38
5.0.30.0000.0338.23
5.0.20.0030.0178.27
5.0.10.0030.0278.21
5.0.00.0070.0278.21
4.4.90.0000.0178.21
4.4.80.0000.0338.21
4.4.70.0030.0308.21
4.4.60.0000.0238.21
4.4.50.0000.0238.21
4.4.40.0000.0238.21
4.4.30.0070.0278.21
4.4.20.0000.0208.21
4.4.10.0030.0178.21
4.4.00.0000.0238.21
4.3.110.0000.0178.21
4.3.100.0030.0178.21
4.3.90.0000.0178.21
4.3.80.0000.0238.21
4.3.70.0000.0278.21
4.3.60.0000.0178.21
4.3.50.0030.0138.21
4.3.40.0000.0408.21
4.3.30.0000.0208.21
4.3.20.0030.0138.21
4.3.10.0000.0178.21
4.3.00.0000.0178.21

preferences:
42.42 ms | 401 KiB | 5 Q