3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank"); $rand_keys = array_rand($input, 2); echo $rand_keys; echo $input[$rand_keys[0]] . "\n"; echo $input[$rand_keys[1]] . "\n"; ?>

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)
7.4.10.0110.00315.14
7.4.00.0160.00315.03
7.3.130.0130.00315.02
7.3.120.0020.01314.71
7.3.110.0040.01514.96
7.3.100.0030.01014.79
7.3.90.0040.00714.86
7.3.80.0080.00814.85
7.3.70.0060.00915.01
7.3.60.0040.00814.98
7.3.50.0070.00715.00
7.3.40.0080.00314.95
7.3.30.0070.00714.62
7.3.20.0000.00916.77
7.3.10.0070.00716.81
7.3.00.0100.00316.77
7.2.260.0100.00715.32
7.2.250.0070.01014.91
7.2.240.0030.01415.28
7.2.230.0070.00715.02
7.2.220.0000.01215.17
7.2.210.0110.00414.85
7.2.200.0100.00314.95
7.2.190.0040.01115.00
7.2.180.0060.00315.01
7.2.170.0030.00715.03
7.2.160.0040.00714.92
7.2.150.0000.01216.61
7.2.140.0040.00717.05
7.2.130.0030.00616.74
7.2.120.0060.01017.10
7.2.110.0090.00916.88
7.2.100.0070.00316.71
7.2.90.0060.00816.80
7.2.80.0060.00617.03
7.2.70.0070.01317.13
7.2.60.0050.00517.03
7.2.50.0000.01516.97
7.2.40.0030.00616.66
7.2.30.0070.01017.03
7.2.20.0000.01317.02
7.2.10.0000.01216.83
7.2.00.0040.00918.12
7.1.330.0030.01515.82
7.1.320.0040.01115.76
7.1.310.0070.00715.86
7.1.300.0070.00715.45
7.1.290.0000.01015.93
7.1.280.0080.00415.80
7.1.270.0040.01115.73
7.1.260.0030.01315.55
7.1.250.0000.00816.05
7.1.240.0150.00015.75
7.1.230.0080.00415.73
7.1.220.0030.01015.93
7.1.210.0030.01215.63
7.1.200.0040.01215.95
7.1.190.0090.00915.68
7.1.180.0060.00615.48
7.1.170.0040.01115.98
7.1.160.0030.01015.80
7.1.150.0070.01116.00
7.1.140.0000.01715.90
7.1.130.0040.00715.91
7.1.120.0060.00615.60
7.1.110.0040.00815.83
7.1.100.0070.00715.72
7.1.90.0070.00415.79
7.1.80.0070.00715.98
7.1.70.0090.00416.62
7.1.60.0080.01017.61
7.1.50.0080.00816.29
7.1.40.0030.00615.82
7.1.30.0030.01315.82
7.1.20.0000.00915.61
7.1.10.0040.00815.66
7.1.00.0070.03519.11
7.0.330.0080.00015.26
7.0.320.0060.00315.44
7.0.310.0100.00715.40
7.0.300.0070.01015.23
7.0.290.0100.00315.45
7.0.280.0100.00715.20
7.0.270.0040.00815.54
7.0.260.0030.00715.61
7.0.250.0030.01015.40
7.0.240.0060.01015.46
7.0.230.0070.00315.25
7.0.220.0060.00315.49
7.0.210.0120.00015.45
7.0.200.0030.00915.92
7.0.190.0070.01015.29
7.0.180.0000.01115.56
7.0.170.0110.00415.46
7.0.160.0060.00615.56
7.0.150.0070.01015.57
7.0.140.0060.03718.67
7.0.130.0100.01015.48
7.0.120.0110.00415.21
7.0.110.0070.00715.51
7.0.100.0060.00615.43
7.0.90.0070.00715.34
7.0.80.0040.00915.34
7.0.70.0000.00915.31
7.0.60.0070.03117.61
7.0.50.0080.04216.68
7.0.40.0070.02716.87
7.0.30.0200.03216.71
7.0.20.0120.03416.82
7.0.10.0150.03916.86
7.0.00.0070.02316.65
5.6.400.0030.01014.39
5.6.390.0100.00714.64
5.6.380.0120.00014.32
5.6.370.0130.00314.02
5.6.360.0070.00714.57
5.6.350.0070.01014.38
5.6.340.0090.00614.59
5.6.330.0040.01214.46
5.6.320.0000.00814.27
5.6.310.0060.00614.55
5.6.300.0100.00614.59
5.6.290.0040.01114.30
5.6.280.0050.04017.83
5.6.270.0030.01314.44
5.6.260.0060.00914.50
5.6.250.0040.01114.43
5.6.240.0030.00714.56
5.6.230.0110.00714.57
5.6.220.0060.00314.52
5.6.210.0070.04017.60
5.6.200.0080.02116.20
5.6.190.0100.03717.33
5.6.180.1530.02217.30
5.6.170.0160.02817.26
5.6.160.0100.03117.44
5.6.150.0030.02516.34
5.6.140.0050.04316.17
5.6.130.0020.04916.40
5.6.120.0020.04817.65
5.6.110.0070.02317.72
5.6.100.0020.02617.67
5.6.90.0050.04117.63
5.6.80.0080.04317.39
5.6.70.0030.01014.41
5.6.60.0040.00714.14
5.6.50.0060.00614.12
5.6.40.0030.00914.54
5.6.30.0060.00614.31
5.6.20.0000.01014.12
5.6.10.0000.01514.20
5.6.00.0050.00514.54
5.5.380.0060.00614.09
5.5.370.0070.01014.06
5.5.360.0070.00314.33
5.5.350.0180.04117.51
5.5.340.0090.04116.04
5.5.330.0070.02217.21
5.5.320.0170.03817.47
5.5.310.0600.03017.19
5.5.300.0070.04216.07
5.5.290.0050.02716.09
5.5.280.0110.04317.57
5.5.270.0050.03617.48
5.5.260.0100.04317.66
5.5.250.0030.04317.39
5.5.240.0070.04217.18
5.5.230.0130.00014.22
5.5.220.0040.01114.28
5.5.210.0070.00414.39
5.5.200.0060.00914.04
5.5.190.0030.00614.26
5.5.180.0030.00813.98
5.5.170.0040.00414.08
5.5.160.0060.00614.43
5.5.150.0030.00514.14
5.5.140.0060.00314.16
5.5.130.0070.00414.32
5.5.120.0000.01214.39
5.5.110.0000.01314.39
5.5.100.0040.00714.49
5.5.90.0040.00714.50
5.5.80.0080.00414.29
5.5.70.0040.00414.46
5.5.60.0030.00914.32
5.5.50.0040.00814.33
5.5.40.0040.00414.00
5.5.30.0100.00714.61
5.5.20.0060.00914.08
5.5.10.0090.00314.09
5.5.00.0080.00614.27
5.4.450.0240.02015.64
5.4.440.0430.02616.77
5.4.430.0120.02516.77
5.4.420.0050.02516.77
5.4.410.0230.02016.77
5.4.400.0460.01916.77
5.4.390.0230.03316.77
5.4.380.0270.02416.77
5.4.370.0090.01816.77
5.4.360.0230.03716.77
5.4.350.0280.01516.77
5.4.340.0300.02416.77
5.4.330.0030.00611.74
5.4.320.0100.02416.77
5.4.310.0320.02416.77
5.4.300.0170.02916.77
5.4.290.0220.02016.77
5.4.280.0180.02516.77
5.4.270.0380.02016.77
5.4.260.0440.02016.77
5.4.250.0230.02316.77
5.4.240.0270.02916.77
5.4.230.0190.02216.77
5.4.220.0180.02416.77
5.4.210.0340.01916.77
5.4.200.0220.02416.77
5.4.190.0290.02116.77
5.4.180.0490.02016.77
5.4.170.0230.02116.77
5.4.160.0380.02216.77
5.4.150.0480.02616.77
5.4.140.0360.02516.77
5.4.130.0170.02316.77
5.4.120.0230.02216.77
5.4.110.0470.01316.77
5.4.100.0250.02216.77
5.4.90.0490.02416.77
5.4.80.0250.02416.77
5.4.70.0340.03216.77
5.4.60.0300.02416.77
5.4.50.0300.02016.77
5.4.40.0300.02016.77
5.4.30.0370.01616.77
5.4.20.0200.02016.77
5.4.10.0160.01916.77
5.4.00.0180.02116.77
5.3.290.0400.02316.77
5.3.280.0260.02116.77
5.3.270.0440.01616.77
5.3.260.0250.02316.77
5.3.250.0250.02316.77
5.3.240.0250.02016.77
5.3.230.0200.02816.77
5.3.220.0360.03516.77
5.3.210.0040.01816.77
5.3.200.0220.02316.77
5.3.190.0230.02316.77
5.3.180.0400.02016.77
5.3.170.0300.01916.77
5.3.160.0350.02016.77
5.3.150.0200.03016.77
5.3.140.0200.02516.77
5.3.130.0270.02016.77
5.3.120.0400.02316.77
5.3.110.0350.01716.77
5.3.100.0420.03216.77
5.3.90.0350.02116.77
5.3.80.0270.02116.77
5.3.70.0110.01716.77
5.3.60.0350.01616.77
5.3.50.0280.01716.77
5.3.40.0370.01616.77
5.3.30.0270.02416.77
5.3.20.0380.01816.77
5.3.10.0220.01616.77
5.3.00.0160.02916.77
5.2.170.0700.02321.80
5.2.160.0530.03021.80
5.2.150.0470.02721.80
5.2.140.0530.03321.80
5.2.130.0530.03021.80
5.2.120.0600.03021.80
5.2.110.0400.03021.80
5.2.100.0330.02321.80
5.2.90.0500.03021.80
5.2.80.0030.02321.80
5.2.70.0300.03721.80
5.2.60.0400.02721.80
5.2.50.0430.02721.80
5.2.40.0300.03321.80
5.2.30.0470.02321.80
5.2.20.0500.02721.80
5.2.10.0400.03321.80
5.2.00.0430.02721.80
5.1.60.0370.02021.80
5.1.50.0430.02021.80
5.1.40.0270.03021.80
5.1.30.0370.01721.80
5.1.20.0400.02321.80
5.1.10.0100.02321.80
5.1.00.0470.02321.80
5.0.50.0030.02321.80
5.0.40.0030.02021.80
5.0.30.0130.03021.80
5.0.20.0070.02321.80
5.0.10.0130.02021.80
5.0.00.0270.02721.80
4.4.90.0100.01021.80
4.4.80.0270.01721.80
4.4.70.0170.02021.80
4.4.60.0330.01021.80
4.4.50.0270.01321.80
4.4.40.0230.02721.80
4.4.30.0030.02021.80
4.4.20.0030.01321.80
4.4.10.0100.01721.80
4.4.00.0070.02321.80
4.3.110.0070.01321.80
4.3.100.0130.01321.80
4.3.90.0070.01321.80
4.3.80.0070.02321.80
4.3.70.0030.02021.80
4.3.60.0030.01321.80
4.3.50.0000.02321.80
4.3.40.0000.03721.80
4.3.30.0070.01721.80
4.3.20.0000.01721.80
4.3.10.0100.01321.80
4.3.00.0000.01721.80

preferences:
40.8 ms | 401 KiB | 5 Q