3v4l.org

run code in 300+ PHP versions simultaneously
<?php function encode_char($c) { $sum = ord($c); $first = rand(-100,100); $second = rand(-100,100); $third = $sum - ($first + $second); return [$first, $second, $third]; } print_r(encode_char('a')); ?>

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.00.0030.01515.20
7.3.120.0000.01614.77
7.3.110.0000.01315.01
7.3.100.0060.01014.87
7.3.90.0080.00814.82
7.3.80.0090.00314.77
7.3.70.0070.00714.80
7.3.60.0070.00714.70
7.3.50.0000.01214.77
7.3.40.0000.01014.77
7.3.30.0050.00514.79
7.3.20.0090.00616.50
7.3.10.0100.00316.57
7.3.00.0040.00716.62
7.2.250.0070.01314.84
7.2.240.0130.00314.95
7.2.230.0040.01414.77
7.2.220.0060.00614.59
7.2.210.0110.00714.82
7.2.200.0090.00615.08
7.2.190.0070.00715.00
7.2.180.0080.00414.91
7.2.170.0040.01215.19
7.2.00.0060.00619.29
7.1.330.0110.00415.71
7.1.320.0000.01415.64
7.1.310.0090.00315.70
7.1.300.0030.00615.85
7.1.290.0040.01115.94
7.1.280.0070.01015.59
7.1.270.0030.01015.59
7.1.260.0040.00815.57
7.1.70.0030.00617.39
7.1.60.0070.00317.39
7.1.50.0070.00717.39
7.1.40.0260.00617.39
7.1.30.0040.00817.39
7.1.20.0070.00317.39
7.1.10.0000.00717.39
7.1.00.0000.01017.39
7.0.200.0030.00717.39
7.0.190.0030.01017.39
7.0.180.0030.00617.39
7.0.170.0060.00317.39
7.0.160.0030.00717.39
7.0.150.0040.00417.39
7.0.140.0080.00417.39
7.0.130.0040.00417.39
7.0.120.0070.00317.39
7.0.110.0060.00317.39
7.0.100.0000.00717.39
7.0.90.0050.00217.39
7.0.80.0040.00417.39
7.0.70.0000.00817.39
7.0.60.0040.00417.39
7.0.50.0000.00817.39
7.0.40.0060.00317.39
7.0.30.0000.00717.39
7.0.20.0000.00717.39
7.0.10.0050.00317.39
7.0.00.0040.00417.39
5.6.300.0030.04320.76
5.6.290.0030.04520.91
5.6.280.0030.03920.85
5.6.270.0130.03220.85
5.6.260.0030.04220.84
5.6.250.0100.03920.88
5.6.240.0070.04420.97
5.6.230.0100.06820.83
5.6.220.0030.04920.79
5.6.210.0030.04321.04
5.6.200.0070.04020.82
5.6.190.0030.04020.93
5.6.180.0060.03921.00
5.6.170.0030.04221.03
5.6.160.0030.04620.76
5.6.150.0100.04620.78
5.6.140.0070.04020.79
5.6.130.0000.05220.92
5.6.120.0000.04920.80
5.6.110.0360.04620.82
5.6.100.0100.03920.76
5.6.90.0000.04420.91
5.6.80.0030.03920.12
5.6.70.0040.04420.40
5.6.60.0130.03420.14
5.6.50.0100.04720.19
5.6.40.0000.05120.35
5.6.30.0250.04620.29
5.6.20.0000.04720.34
5.6.10.0030.04020.39
5.6.00.0210.04220.07
5.5.380.0070.03717.55
5.5.370.0070.04617.51
5.5.360.0070.03917.54
5.5.350.0000.04917.41
5.5.340.0030.04117.82
5.5.330.0040.04318.07
5.5.320.0140.02818.02
5.5.310.0030.04418.06
5.5.300.0270.04017.98
5.5.290.0070.04618.05
5.5.280.0000.04818.05
5.5.270.0030.05118.06
5.5.260.0000.04718.01
5.5.250.0030.03917.48
5.5.240.0040.04317.39
5.5.230.0040.04317.39
5.5.220.0000.04817.39
5.5.210.0000.04517.42
5.5.200.0000.04417.39
5.5.190.0060.03817.42
5.5.180.0090.03717.40
5.5.160.0060.03917.39
5.5.150.0000.04617.39
5.5.140.0130.03217.39
5.5.130.0030.04217.45
5.5.120.0090.03517.40
5.5.110.0060.03817.39
5.5.100.0030.04117.39
5.5.90.0030.04017.39
5.5.80.0140.03117.39
5.5.70.0040.04317.39
5.5.60.0270.04117.39
5.5.50.0070.03417.39
5.5.40.0000.04517.39
5.5.30.0060.03417.39
5.5.20.0100.03217.39
5.5.10.0060.03717.39
5.5.00.0000.04417.39
5.4.450.0070.04219.40
5.4.440.0120.03719.49
5.4.430.0070.03819.41
5.4.420.0070.04319.23
5.4.410.0000.04119.12
5.4.400.0000.04118.99
5.4.390.0060.04019.20
5.4.380.0000.04619.12
5.4.370.0040.04318.92
5.4.360.0000.04419.02
5.4.350.0030.04018.99
5.4.340.0100.03619.06
5.4.320.0000.04319.20
5.4.310.0030.03818.91
5.4.300.0000.04319.11
5.4.290.0030.03718.90
5.4.280.0030.04019.16
5.4.270.0060.03518.91
5.4.260.0070.03819.10
5.4.250.0000.04518.90
5.4.240.0000.04119.19
5.4.230.0060.04219.02
5.4.220.0030.04118.95
5.4.210.0000.04418.91
5.4.200.0070.03419.07
5.4.190.0030.04218.91
5.4.180.0150.02718.96
5.4.170.0000.04118.98
5.4.160.0090.03519.08
5.4.150.0030.04019.09
5.4.140.0070.04017.39
5.4.130.0030.04817.39
5.4.120.0000.06617.39
5.4.110.0040.03617.39
5.4.100.0000.03917.39
5.4.90.0040.03617.39
5.4.80.0030.03517.39
5.4.70.0000.03817.39
5.4.60.0070.03417.39
5.4.50.0090.02917.39
5.4.40.0070.03417.39
5.4.30.0090.03017.39
5.4.20.0040.04017.39
5.4.10.0070.03417.39
5.4.00.0230.03317.39
5.3.290.0030.05117.39
5.3.280.0070.04117.39
5.3.270.0030.03917.39
5.3.260.0040.03917.39
5.3.250.0060.03217.39
5.3.240.0090.03017.39
5.3.230.0030.05917.39
5.3.220.0070.03617.39
5.3.210.0070.03917.39
5.3.200.0070.03317.39
5.3.190.0030.04217.39
5.3.180.0030.03617.39
5.3.170.0000.04217.39
5.3.160.0060.03717.39
5.3.150.0070.04217.39
5.3.140.0070.03617.39
5.3.130.0030.04117.39
5.3.120.0040.04217.39
5.3.110.0060.04017.39
5.3.100.0000.04017.39
5.3.90.0060.03817.39
5.3.80.0060.03517.39
5.3.70.0030.03417.39
5.3.60.0030.03417.39
5.3.50.0000.03717.39
5.3.40.0090.03517.39
5.3.30.0000.03917.39
5.3.20.0060.03417.39
5.3.10.0030.03317.39
5.3.00.0030.03717.39
5.2.170.0060.02617.39
5.2.160.0030.04217.39
5.2.150.0000.03217.39
5.2.140.0140.04117.39
5.2.130.0030.02717.39
5.2.120.0060.02517.39
5.2.110.0040.02917.39
5.2.100.0060.02417.39
5.2.90.0060.02817.39
5.2.80.0000.03217.39
5.2.70.0030.03817.39
5.2.60.0030.03317.39
5.2.50.0000.04117.39
5.2.40.0040.02917.39
5.2.30.0030.03217.39
5.2.20.0000.03217.39
5.2.10.0100.02617.39
5.2.00.0000.03817.39
5.1.60.0000.03117.39
5.1.50.0030.02717.39
5.1.40.0000.02617.39
5.1.30.0040.03617.39
5.1.20.0030.02517.39
5.1.10.0000.02917.39
5.1.00.0000.03217.39
5.0.50.0060.01717.39
5.0.40.0030.01917.39
5.0.30.0030.03517.39
5.0.20.0030.01917.39
5.0.10.0060.01617.39
5.0.00.0060.02817.39
4.4.90.0030.01417.39
4.4.80.0000.02817.39
4.4.70.0030.01417.39
4.4.60.0030.01417.39
4.4.50.0030.01417.39
4.4.40.0180.02117.39
4.4.30.0000.01817.39
4.4.20.0060.01117.39
4.4.10.0000.01817.39
4.4.00.0120.02317.39
4.3.110.0030.02317.39
4.3.100.0000.01917.39
4.3.90.0060.01217.39
4.3.80.0030.02417.39
4.3.70.0060.01317.39
4.3.60.0100.01317.39
4.3.50.0150.00917.39
4.3.40.0000.02917.39
4.3.30.0030.01917.39
4.3.20.0000.01817.39
4.3.10.0040.01317.39
4.3.00.0000.02117.39

preferences:
34.61 ms | 400 KiB | 5 Q