3v4l.org

run code in 300+ PHP versions simultaneously
<?php function mbStringToArray ($string) { $strlen = mb_strlen($string); while ($strlen) { $array[] = mb_substr($string,0,1,"UTF-8"); $string = mb_substr($string,1,$strlen,"UTF-8"); $strlen = mb_strlen($string); } return $array; } $a = "आलोक"; $lol = mbStringToArray($a); print_r($lol); $test = json_decode('"\u093F"'); function countVowels($req){ $hindi = array("\u0906","\u0908","\u093E","\u093F","\u0945","\u0946","\u0947","\u0948","\u0949","\u094A","\u094B","\u094C","\u094D"); $vowels= array(); $vowelcount = 0; for($i = 0; $i<count($hindi); $i++){ array_push($vowels,json_decode('"'.$hindi[$i].'"')); } for($j=0;$j<count($req);$j++){ if(in_array($req[$j], $vowels)) $vowelcount++; } echo $vowelcount; } countVowels($lol); ?>

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.110.0050.00320.94
8.3.100.0080.00316.64
8.3.90.0080.00018.32
8.3.80.0030.00618.55
8.3.70.0130.01018.56
8.3.60.0160.00318.31
8.3.50.0120.00822.07
8.3.40.0110.00418.92
8.3.30.0070.00719.17
8.3.20.0160.00320.13
8.3.10.0070.01123.54
8.3.00.0150.00319.38
8.2.230.0000.01622.58
8.2.220.0040.00424.06
8.2.210.0050.00326.77
8.2.200.0060.00616.63
8.2.190.0140.00418.05
8.2.180.0090.00916.75
8.2.170.0120.00319.09
8.2.160.0100.01022.96
8.2.150.0050.00325.66
8.2.140.0070.00424.66
8.2.130.0100.00326.16
8.2.120.0060.00321.05
8.2.110.0040.00419.38
8.2.100.0080.00317.97
8.2.90.0030.00619.35
8.2.80.0040.00417.97
8.2.70.0060.00317.75
8.2.60.0030.00617.93
8.2.50.0040.00418.07
8.2.40.0030.00618.22
8.2.30.0080.00018.14
8.2.20.0040.00417.71
8.2.10.0000.00918.10
8.2.00.0000.00817.75
8.1.290.0080.00418.88
8.1.280.0100.00725.92
8.1.270.0000.00822.23
8.1.260.0140.00426.35
8.1.250.0040.00428.09
8.1.240.0040.00422.75
8.1.230.0040.00817.83
8.1.220.0050.00317.74
8.1.210.0030.00618.77
8.1.200.0120.00017.13
8.1.190.0050.00317.13
8.1.180.0000.00818.10
8.1.170.0030.00520.16
8.1.160.0030.00522.03
8.1.150.0040.00418.81
8.1.140.0070.00017.46
8.1.130.0000.00717.85
8.1.120.0000.00817.50
8.1.110.0070.00017.47
8.1.100.0040.00417.38
8.1.90.0040.00417.35
8.1.80.0050.00317.30
8.1.70.0000.00717.44
8.1.60.0040.00417.57
8.1.50.0040.00417.57
8.1.40.0060.00317.59
8.1.30.0080.00017.55
8.1.20.0070.00017.64
8.1.10.0000.00817.50
8.1.00.0030.00517.59
8.0.300.0070.00018.87
8.0.290.0040.00416.63
8.0.280.0030.00318.53
8.0.270.0040.00417.33
8.0.260.0000.00617.34
8.0.250.0040.00417.07
8.0.240.0070.00017.01
8.0.230.0040.00417.04
8.0.220.0050.00316.99
8.0.210.0030.00316.99
8.0.200.0030.00316.98
8.0.190.0030.00516.92
8.0.180.0070.00016.97
8.0.170.0040.00417.01
8.0.160.0030.00317.04
8.0.150.0090.00016.95
8.0.140.0040.00416.95
8.0.130.0030.00313.48
8.0.120.0000.00816.82
8.0.110.0000.00716.89
8.0.100.0000.00717.04
8.0.90.0050.00216.96
8.0.80.0120.00916.95
8.0.70.0080.00017.08
8.0.60.0000.00716.99
8.0.50.0040.00417.01
8.0.30.0110.00717.01
8.0.20.0070.01317.40
8.0.10.0080.00016.93
8.0.00.0080.01216.82
7.4.330.0050.00315.02
7.4.320.0030.00616.62
7.4.300.0060.00016.64
7.4.290.0030.00316.41
7.4.280.0000.00716.50
7.4.270.0060.00016.54
7.4.260.0070.00016.52
7.4.250.0030.00516.48
7.4.240.0000.00716.60
7.4.230.0000.00716.52
7.4.220.0090.00916.71
7.4.210.0100.00316.63
7.4.200.0070.00016.72
7.4.160.0120.00616.48
7.4.150.0110.00717.40
7.4.140.0150.00417.86
7.4.130.0040.01316.57
7.4.120.0060.01116.68
7.4.110.0070.01416.34
7.4.100.0110.00616.50
7.4.90.0140.00316.57
7.4.80.0100.01319.39
7.4.70.0070.01016.54
7.4.60.0100.01316.40
7.4.50.0050.00316.39
7.4.40.0090.00916.41
7.4.30.0100.00616.39
7.4.00.0060.00914.90
7.3.330.0030.00313.33
7.3.320.0000.00513.16
7.3.310.0000.00716.22
7.3.300.0070.00016.19
7.3.290.0100.00816.32
7.3.280.0090.00616.29
7.3.270.0100.00717.40
7.3.260.0090.00916.60
7.3.250.0100.00716.54
7.3.240.0110.00716.44
7.3.230.0040.01216.43
7.3.210.0030.01316.73
7.3.200.0060.00919.39
7.3.190.0100.00716.44
7.3.180.0100.00716.44
7.3.170.0130.00316.58
7.3.160.0090.00616.68
7.2.330.0080.00816.71
7.2.320.0110.00916.48
7.2.310.0110.00716.59
7.2.300.0100.00716.46
7.2.290.0100.01116.78
7.2.60.0030.01416.91
7.2.00.0040.01419.21
7.1.200.0120.00615.76
7.1.100.0000.01117.94
7.1.70.0000.00716.93
7.1.60.0070.00417.29
7.1.50.0080.00617.16
7.1.40.0030.01716.65
7.1.30.0100.01316.52
7.1.20.0100.00616.83
7.1.10.0000.01016.55
7.1.00.0040.00416.78
7.0.200.0000.00816.96
7.0.190.0000.00816.88
7.0.180.0070.00316.30
7.0.170.0000.00916.35
7.0.160.0000.01016.38
7.0.150.0000.01416.50
7.0.140.0090.00016.38
7.0.130.0050.00316.58
7.0.120.0030.00516.54
7.0.110.0040.00416.38
7.0.100.0070.00016.35
7.0.90.0030.00616.27
7.0.80.0000.00816.62
7.0.70.0040.00716.55
7.0.60.0000.00816.19
7.0.50.0030.00716.46
7.0.40.0030.00915.52
7.0.30.0080.00015.52
7.0.20.0020.00515.52
7.0.10.0030.00515.52
7.0.00.0060.00315.52
5.6.300.0070.06420.83
5.6.290.0130.04020.68
5.6.280.0060.03920.89
5.6.270.0100.03920.92
5.6.260.0030.04320.81
5.6.250.0030.04520.81
5.6.240.0100.04020.86
5.6.230.0140.04520.85
5.6.220.0100.03820.86
5.6.210.0100.03921.05
5.6.200.0030.04320.79
5.6.190.0070.04321.01
5.6.180.0000.05921.02
5.6.170.0030.04021.01
5.6.160.0000.04820.83
5.6.150.0040.04620.92
5.6.140.0030.06521.02
5.6.130.0030.05020.84
5.6.120.0070.03820.93
5.6.110.0030.04121.00
5.6.100.0100.04020.86
5.6.90.0070.04020.81
5.6.80.0060.03920.38
5.6.70.0000.04320.28
5.6.60.0070.04620.41
5.6.50.0060.03820.38
5.6.40.0030.04420.26
5.6.30.0170.03720.16
5.6.20.0000.04520.14
5.6.10.0030.04120.28
5.6.00.0000.04520.25
5.5.380.0160.05217.56
5.5.370.0030.03817.55
5.5.360.0100.03817.55
5.5.350.0000.04417.60
5.5.340.0070.04118.03
5.5.330.0030.03917.77
5.5.320.0070.03917.79
5.5.310.0170.04017.96
5.5.300.0030.04517.74
5.5.290.0000.05918.01
5.5.280.0000.04817.71
5.5.270.0030.04517.74
5.5.260.0000.05118.14
5.5.250.0070.03917.84
5.5.240.0000.04117.50
5.5.230.0070.04717.44
5.5.220.0030.03717.52
5.5.210.0000.04617.44
5.5.200.0000.04117.50
5.5.190.0030.03817.33
5.5.180.0070.04117.33
5.5.160.0070.05617.37
5.5.150.0130.03717.35
5.5.140.0030.03617.35
5.5.130.0000.04017.09
5.5.120.0030.04417.50
5.5.110.0030.05917.34
5.5.100.0000.04517.32
5.5.90.0200.04117.35
5.5.80.0040.04916.99
5.5.70.0100.03316.98
5.5.60.0030.06517.27
5.5.50.0070.03717.39
5.5.40.0200.03617.11
5.5.30.0000.04017.07
5.5.20.0030.03717.21
5.5.10.0030.03817.34
5.5.00.0000.04217.24
5.4.450.0030.04019.38
5.4.440.0000.04419.28
5.4.430.0030.04119.27
5.4.420.0100.03519.52
5.4.410.0000.04219.18
5.4.400.0070.03518.96
5.4.390.0030.06219.05
5.4.380.0160.02918.96
5.4.370.0070.03719.05
5.4.360.0030.03818.95
5.4.350.0030.03519.05
5.4.340.0000.04118.96
5.4.320.0030.04118.95
5.4.310.0000.03918.96
5.4.300.0070.05019.14
5.4.290.0070.03818.96
5.4.280.0000.04619.02
5.4.270.0100.03918.98
5.4.260.0000.06719.04
5.4.250.0000.04219.20
5.4.240.0070.04019.11
5.4.230.0030.03719.05
5.4.220.0000.04319.25
5.4.210.0030.03819.04
5.4.200.0070.03419.05
5.4.190.0000.04418.96
5.4.180.0030.03619.04
5.4.170.0000.04118.93
5.4.160.0030.06419.02
5.4.150.0030.04819.18
5.4.140.0000.04416.57
5.4.130.0030.03716.80
5.4.120.0000.04116.73
5.4.110.0030.03816.70
5.4.100.0000.03816.69
5.4.90.0030.03416.76
5.4.80.0000.03616.52
5.4.70.0000.07916.74
5.4.60.0060.03216.57
5.4.50.0070.03316.68
5.4.40.0030.04816.77
5.4.30.0030.03716.61
5.4.20.0000.04016.62
5.4.10.0070.03316.45
5.4.00.0030.03416.04
5.3.290.0030.04315.52
5.3.280.0070.03615.52
5.3.270.0000.04115.52
5.3.260.0000.06415.52
5.3.250.0070.03615.52
5.3.240.0000.03815.52
5.3.230.0170.04715.52
5.3.220.0130.04415.52
5.3.210.0030.03615.52
5.3.200.0030.03615.52
5.3.190.0000.04315.52
5.3.180.0000.05715.52
5.3.170.0030.06315.52
5.3.160.0060.04115.52
5.3.150.0030.04715.52
5.3.140.0030.03815.52
5.3.130.0140.03815.52
5.3.120.0000.04415.52
5.3.110.0030.03815.52
5.3.100.0060.03615.52
5.3.90.0030.03715.52
5.3.80.0070.03915.52
5.3.70.0030.03815.52
5.3.60.0030.03415.52
5.3.50.0030.03815.52
5.3.40.0030.03415.52
5.3.30.0000.03815.52
5.3.20.0000.04115.52
5.3.10.0030.03615.52
5.3.00.0030.03615.52
5.2.170.0000.04415.52
5.2.160.0030.07415.52
5.2.150.0000.04415.52
5.2.140.0030.03015.52
5.2.130.0030.03015.52
5.2.120.0000.03115.52
5.2.110.0060.02815.52
5.2.100.0000.03115.52
5.2.90.0000.03015.52
5.2.80.0000.03115.52
5.2.70.0000.03115.52
5.2.60.0070.02315.52
5.2.50.0070.04415.52
5.2.40.0030.02915.52
5.2.30.0030.02715.52
5.2.20.0000.03415.52
5.2.10.0030.02815.52
5.2.00.0060.03515.52
5.1.60.0030.02415.52
5.1.50.0110.02515.52
5.1.40.0030.02715.52
5.1.30.0000.03015.52
5.1.20.0070.02215.52
5.1.10.0030.04315.52
5.1.00.0100.01915.52
5.0.50.0000.02215.52
5.0.40.0000.03815.52
5.0.30.0000.03315.52
5.0.20.0000.02115.52
5.0.10.0130.01615.52
5.0.00.0000.03415.52
4.4.90.0040.01415.52
4.4.80.0000.02215.52
4.4.70.0000.01615.52
4.4.60.0030.01415.52
4.4.50.0030.02015.52
4.4.40.0000.03115.52
4.4.30.0000.02015.52
4.4.20.0000.01615.52
4.4.10.0000.02315.52
4.4.00.0000.02815.52
4.3.110.0030.01315.52
4.3.100.0000.01915.52
4.3.90.0070.01315.52
4.3.80.0070.02715.52
4.3.70.0030.01415.52
4.3.60.0000.01615.52
4.3.50.0000.01615.52
4.3.40.0030.02215.52
4.3.30.0000.01715.52
4.3.20.0000.01715.52
4.3.10.0000.01815.52
4.3.00.0060.00915.52

preferences:
29.7 ms | 403 KiB | 5 Q