3v4l.org

run code in 300+ PHP versions simultaneously
<?php $health = array('healthy', 'fit', 'happy'); $wealth = array('Bank Account' => 15000000, 'House' => 'Mansion on the water','Net Worth' => '65000000 net worth'); $stuff = array('cars'=> array('Ferrari California','Lexus RC', 'Mercedes AMG', 'Range Rover'), 'toys'=> array('yacht', 'jet skis','private jet','pool house','man cave', 'vacation homes', 'spa', 'golf', 'bbqs', 'private dinners', 'f cups')); $relationships = array('danee', 'family', 'friends', 'universe', 'my creator'); $success = array('famous', 'billion dollar business', 'ceo', 'actor', 'opportunities', 'investments'); $myLife = array('health' => $health,'wealth' => $wealth, 'relationships' => $relationships, 'success' => $success, 'stuff' => $stuff); function element($array) { for ($i=0; $i < count($array); $i++) { echo $array[$i] . ', '; } } echo 'I have an amazing life.</br></br>'; echo 'In health, ' . 'I have ' ; for($i=0;$i<count($health); $i++) { echo $health[$i] . ', '; } echo '</br></br>'; echo 'In wealth, I have ' ; foreach($wealth as $element=>$what){ echo $what . ', '; } echo '</br></br>'; echo 'In relationships, I have '; for($i=0;$i<count($relationships); $i++) { echo $relationships[$i] . ', ';} echo '</br></br>'; echo 'In success, I have '; for($i=0;$i<count($success); $i++) { echo $success[$i] . ', ';} echo '</br></br>';

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.01416.75
8.3.60.0100.01018.45
8.3.50.0120.00821.15
8.3.40.0080.01218.55
8.3.30.0080.00818.70
8.3.20.0090.00920.14
8.3.10.0080.00021.81
8.3.00.0030.00717.68
8.2.180.0160.00318.05
8.2.170.0100.00722.96
8.2.160.0030.01020.39
8.2.150.0030.00524.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0080.00317.63
8.2.110.0000.01019.19
8.2.100.0000.01117.97
8.2.90.0000.00819.27
8.2.80.0030.00517.97
8.2.70.0060.00317.50
8.2.60.0040.00417.93
8.2.50.0080.00518.07
8.2.40.0000.00821.19
8.2.30.0030.00619.82
8.2.20.0040.00417.64
8.2.10.0040.00418.12
8.2.00.0000.00718.13
8.1.280.0070.00725.92
8.1.270.0040.00420.39
8.1.260.0080.00026.35
8.1.250.0040.00428.09
8.1.240.0070.00321.04
8.1.230.0070.00417.57
8.1.220.0040.00417.74
8.1.210.0030.00618.77
8.1.200.0070.00417.23
8.1.190.0000.00817.23
8.1.180.0050.00318.10
8.1.170.0100.00318.25
8.1.160.0000.00721.99
8.1.150.0000.00718.90
8.1.140.0000.00817.38
8.1.130.0000.00717.66
8.1.120.0070.00017.55
8.1.110.0000.00917.37
8.1.100.0000.00817.41
8.1.90.0000.00717.48
8.1.80.0040.00417.43
8.1.70.0070.00017.47
8.1.60.0030.00617.59
8.1.50.0040.00417.50
8.1.40.0030.00617.49
8.1.30.0040.00417.68
8.1.20.0070.00017.65
8.1.10.0000.00817.57
8.1.00.0040.00417.45
8.0.300.0190.00218.77
8.0.290.0040.00416.63
8.0.280.0000.00718.52
8.0.270.0000.00817.26
8.0.260.0070.00017.28
8.0.250.0040.00416.96
8.0.240.0000.00716.99
8.0.230.0070.00016.80
8.0.220.0070.00016.95
8.0.210.0040.00416.91
8.0.200.0000.00616.93
8.0.190.0040.00416.94
8.0.180.0000.01016.91
8.0.170.0080.00016.87
8.0.160.0000.00716.81
8.0.150.0000.00716.76
8.0.140.0070.00016.75
8.0.130.0030.00313.40
8.0.120.0030.00516.77
8.0.110.0040.00416.89
8.0.100.0000.00816.95
8.0.90.0000.00716.77
8.0.80.0040.01816.86
8.0.70.0040.00416.77
8.0.60.0050.00316.95
8.0.50.0040.00416.89
8.0.30.0060.01317.09
8.0.20.0110.00817.40
8.0.10.0070.00017.06
8.0.00.0080.00916.70
7.4.330.0050.00015.08
7.4.320.0060.00016.62
7.4.300.0030.00316.48
7.4.290.0030.00316.55
7.4.280.0000.01116.37
7.4.270.0000.00616.63
7.4.260.0080.00016.50
7.4.250.0070.00016.36
7.4.240.0060.00216.61
7.4.230.0000.00816.59
7.4.220.0130.01316.57
7.4.210.0060.00916.48
7.4.200.0030.00316.32
7.4.160.0130.00316.50
7.4.150.0110.00717.40
7.4.140.0130.00817.86
7.4.130.0100.00916.50
7.4.120.0120.00816.59
7.4.110.0090.01216.54
7.4.100.0070.01016.55
7.4.90.0090.00916.57
7.4.80.0090.00619.39
7.4.70.0130.00516.59
7.4.60.0070.01316.61
7.4.50.0030.00316.55
7.4.40.0030.01716.28
7.4.30.0110.01116.44
7.4.10.0060.01314.87
7.4.00.0100.00515.05
7.3.330.0040.00413.29
7.3.320.0030.00313.39
7.3.310.0040.00416.41
7.3.300.0070.00016.29
7.3.290.0090.00816.38
7.3.280.0090.01116.36
7.3.270.0110.00717.40
7.3.260.0070.01016.36
7.3.250.0090.00916.45
7.3.240.0100.00716.59
7.3.230.0160.00416.51
7.3.210.0150.00416.59
7.3.200.0160.00619.39
7.3.190.0060.01616.49
7.3.180.0100.00516.64
7.3.170.0090.01216.42
7.3.160.0150.00616.38
7.3.130.0110.00714.82
7.3.120.0130.00314.86
7.3.110.0030.01014.40
7.3.100.0000.01414.76
7.3.90.0110.00415.02
7.3.80.0040.00414.81
7.3.70.0060.00614.72
7.3.60.0050.00714.86
7.3.50.0090.00614.67
7.3.40.0160.00314.86
7.3.30.0100.00014.58
7.3.20.0050.00516.77
7.3.10.0030.01016.66
7.3.00.0060.00616.68
7.2.330.0060.01116.44
7.2.320.0170.00316.83
7.2.310.0090.00916.80
7.2.300.0130.00316.63
7.2.290.0200.00616.80
7.2.260.0030.01715.16
7.2.250.0090.00915.11
7.2.240.0030.01215.21
7.2.230.0130.00014.87
7.2.220.0030.01314.91
7.2.210.0060.00614.76
7.2.200.0110.00314.90
7.2.190.0100.01014.72
7.2.180.0100.01014.96
7.2.170.0000.01415.28
7.2.160.0060.00615.01
7.2.150.0030.01016.97
7.2.140.0060.00916.92
7.2.130.0090.00716.91
7.2.120.0120.00616.99
7.2.110.0060.00817.10
7.2.100.0080.00916.97
7.2.90.0040.01116.91
7.2.80.0050.01216.89
7.2.70.0060.00916.69
7.2.60.0110.00917.10
7.2.50.0060.00816.94
7.2.40.0110.01117.00
7.2.30.0110.00716.90
7.2.20.0110.00516.92
7.2.10.0100.00916.75
7.2.00.0080.00617.73
7.1.330.0040.01115.73
7.1.320.0030.00715.79
7.1.310.0110.00415.71
7.1.300.0070.00715.86
7.1.290.0000.01215.60
7.1.280.0030.00915.86
7.1.270.0040.01115.52
7.1.260.0030.00615.84
7.1.250.0040.00815.63
7.1.240.0090.00315.65
7.1.230.0050.00815.94
7.1.220.0070.01015.76
7.1.210.0100.00615.75
7.1.200.0050.01015.85
7.1.190.0060.01115.67
7.1.180.0030.01015.81
7.1.170.0120.00315.71
7.1.160.0070.00915.88
7.1.150.0020.01015.62
7.1.140.0040.01015.79
7.1.130.0050.01115.74
7.1.120.0040.01215.64
7.1.110.0080.01115.75
7.1.100.0050.01016.64
7.1.90.0100.00715.92
7.1.80.0040.01115.86
7.1.70.0040.00716.39
7.1.60.0050.01517.16
7.1.50.0070.01016.31
7.1.40.0020.01315.87
7.1.30.0030.00915.63
7.1.20.0060.01115.67
7.1.10.0040.00915.77
7.1.00.0060.03018.03
7.0.330.0030.00815.46
7.0.320.0080.00715.38
7.0.310.0060.00615.48
7.0.300.0080.00515.41
7.0.290.0050.00915.28
7.0.280.0040.01015.38
7.0.270.0070.01115.29
7.0.260.0110.00315.31
7.0.250.0090.00615.27
7.0.240.0080.00615.55
7.0.230.0120.00515.41
7.0.220.0050.01015.54
7.0.210.0130.00415.37
7.0.200.0100.00315.82
7.0.190.0100.00815.37
7.0.180.0060.01015.53
7.0.170.0100.01015.40
7.0.160.0060.01015.46
7.0.150.0020.01415.35
7.0.140.0140.00515.45
7.0.130.0000.01015.45
7.0.120.0060.00415.43
7.0.110.0110.00315.54
7.0.100.0110.00515.55
7.0.90.0040.00715.51
7.0.80.0060.00315.32
7.0.70.0000.01215.35
7.0.60.0050.03016.88
7.0.50.0050.03116.16
7.0.40.0040.02215.66
7.0.30.0120.02815.73
7.0.20.0160.03115.83
7.0.10.0110.03115.79
7.0.00.0090.02115.65
5.6.400.0000.01114.45
5.6.390.0030.00714.46
5.6.380.0060.00914.46
5.6.370.0050.00614.08
5.6.360.0080.00314.42
5.6.350.0090.00314.48
5.6.340.0050.00914.60
5.6.330.0070.00814.25
5.6.320.0050.00814.44
5.6.310.0060.01014.47
5.6.300.0090.00314.37
5.6.290.0080.00714.43
5.6.280.0050.02516.69
5.6.270.0040.00814.36
5.6.260.0080.00614.41
5.6.250.0030.00914.24
5.6.240.0020.00814.52
5.6.230.0060.00614.25
5.6.220.0010.00814.39
5.6.210.0060.02616.54
5.6.200.0050.03215.60
5.6.190.0070.02616.50
5.6.180.0130.03116.33
5.6.170.0180.02816.39
5.6.160.0080.02916.37
5.6.150.0060.01715.57
5.6.140.0070.02615.61
5.6.130.0030.02415.72
5.6.120.0090.02516.71
5.6.110.0080.02816.71
5.6.100.0100.02816.55
5.6.90.0090.03016.46
5.6.80.0090.01816.48
5.6.70.0050.00914.23
5.6.60.0060.00414.31
5.6.50.0070.00714.29
5.6.40.0070.00714.51
5.6.30.0050.00814.16
5.6.20.0020.01213.99
5.6.10.0030.00914.39
5.6.00.0100.00314.15
5.5.380.0020.00712.72
5.5.370.0050.00612.77
5.5.360.0050.00412.92
5.5.350.0810.01615.29
5.5.340.0040.02414.51
5.5.330.0030.02115.20
5.5.320.0150.02815.16
5.5.310.0170.02615.33
5.5.300.0030.01814.58
5.5.290.0070.02914.40
5.5.280.0080.02615.63
5.5.270.0050.02115.58
5.5.260.0070.01515.50
5.5.250.0080.02915.53
5.5.240.0050.02815.19
5.5.230.0010.00812.65
5.5.220.0060.00612.46
5.5.210.0020.01112.66
5.5.200.0040.00712.68
5.5.190.0030.00812.68
5.5.180.0040.00612.74
5.5.170.0060.00912.59
5.5.160.0030.00812.82
5.5.150.0010.00912.74
5.5.140.0060.00312.93
5.5.130.0050.00512.72
5.5.120.0020.01012.90
5.5.110.0060.00712.79
5.5.100.0060.00512.55
5.5.90.0030.00712.89
5.5.80.0020.00812.63
5.5.70.0090.00512.74
5.5.60.0030.00512.79
5.5.50.0060.00312.67
5.5.40.0050.00912.89
5.5.30.0060.00812.82
5.5.20.0030.00912.88
5.5.10.0020.00912.83
5.5.00.0060.00312.94
5.4.450.0260.02613.79
5.4.440.0300.02714.07
5.4.430.0210.02613.95
5.4.420.0200.02913.91
5.4.410.0220.02413.84
5.4.400.0200.02013.76
5.4.390.0170.02513.72
5.4.380.0240.02313.83
5.4.370.0210.02313.73
5.4.360.0220.02113.86
5.4.350.0230.01913.70
5.4.340.0220.02313.65
5.4.330.0070.00211.06
5.4.320.0220.02013.75
5.4.310.0250.02113.83
5.4.300.0300.02313.84
5.4.290.0240.02313.66
5.4.280.0250.02413.68
5.4.270.0210.02013.80
5.4.260.0240.01813.66
5.4.250.0170.02513.80
5.4.240.0270.02713.86
5.4.230.0230.02013.67
5.4.220.0220.02313.75
5.4.210.0280.02013.62
5.4.200.0210.02112.92
5.4.190.0230.02113.69
5.4.180.0200.01913.62
5.4.170.0240.03013.74
5.4.160.0220.02113.79
5.4.150.0230.01913.59
5.4.140.0220.02013.09
5.4.130.0230.02012.86
5.4.120.0250.01812.88
5.4.110.0180.02213.08
5.4.100.0200.02312.86
5.4.90.0210.01812.75
5.4.80.0170.02512.82
5.4.70.0230.01712.84
5.4.60.0190.02112.83
5.4.50.0240.01712.79
5.4.40.0330.01612.88
5.4.30.0310.01812.73
5.4.20.0280.02312.80
5.4.10.0240.02112.89
5.4.00.0230.02312.75

preferences:
79.8 ms | 401 KiB | 5 Q