3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); header("Content-Type: text/plain; charset=utf-8"); mb_internal_encoding('utf-8'); $text = "ну что. не смотрел еще black mesa.я собирался скачать ,но все как-то некогда было."; function makeFirstLetterUppercase($sentences) { $array = []; foreach ($sentences as $part) { $array[] = mb_strtoupper(mb_substr($part, 0, 1)) . mb_substr($part, 1); } return $array; } function fixText($text) { return preg_replace("/[ ]*([\.,;:!?]+)[ ]*/ui", "$1 ", $text); } $text = preg_split("/(?<=[\.!?])/ui", $text); $text = makeFirstLetterUppercase($text); $text = implode($text); $text = fixText($text); print_r($text);

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.0140.00717.13
8.3.60.0090.00618.70
8.3.50.0060.01216.57
8.3.40.0150.00418.97
8.3.30.0070.00718.96
8.3.20.0040.00419.29
8.3.10.0080.00023.37
8.3.00.0050.00220.58
8.2.190.0140.00018.80
8.2.180.0130.00716.88
8.2.170.0100.00722.96
8.2.160.0100.00321.21
8.2.150.0090.00024.18
8.2.140.0080.00024.66
8.2.130.0000.00721.08
8.2.120.0080.00026.35
8.2.110.0030.00622.23
8.2.100.0040.00718.09
8.2.90.0030.00517.88
8.2.80.0030.00917.97
8.2.70.0050.00318.04
8.2.60.0040.00418.16
8.2.50.0000.00818.10
8.2.40.0040.00421.26
8.2.30.0000.00720.77
8.2.20.0050.00218.28
8.2.10.0080.00018.21
8.2.00.0040.00419.43
8.1.280.0150.00425.92
8.1.270.0030.00622.06
8.1.260.0050.00226.35
8.1.250.0080.00028.09
8.1.240.0120.00919.47
8.1.230.0060.00618.95
8.1.220.0040.00417.78
8.1.210.0080.00018.77
8.1.200.0000.00817.48
8.1.190.0060.00317.35
8.1.180.0000.00818.10
8.1.170.0050.00319.09
8.1.160.0040.00419.04
8.1.150.0000.00819.05
8.1.140.0050.00319.06
8.1.130.0030.00617.73
8.1.120.0030.00517.73
8.1.110.0040.00417.58
8.1.100.0040.00417.64
8.1.90.0000.00817.54
8.1.80.0060.00317.66
8.1.70.0000.00817.64
8.1.60.0050.00317.75
8.1.50.0050.00317.75
8.1.40.0030.00617.80
8.1.30.0030.00617.80
8.1.20.0040.00417.83
8.1.10.0000.00817.70
8.1.00.0050.00317.61
8.0.300.0080.00018.90
8.0.290.0040.00417.00
8.0.280.0000.00718.59
8.0.270.0030.00517.30
8.0.260.0050.00217.02
8.0.250.0030.00317.13
8.0.240.0020.00517.29
8.0.230.0040.00417.14
8.0.220.0070.00017.20
8.0.210.0000.00717.13
8.0.200.0000.00717.27
8.0.190.0040.00417.26
8.0.180.0080.00017.17
8.0.170.0000.00917.22
8.0.160.0000.00717.29
8.0.150.0050.00317.14
8.0.140.0000.00717.14
8.0.130.0060.00013.60
8.0.120.0060.00317.12
8.0.110.0050.00317.12
8.0.100.0050.00317.28
8.0.90.0050.00317.20
8.0.80.0120.00417.19
8.0.70.0030.00517.25
8.0.60.0040.00417.04
8.0.50.0000.00717.23
8.0.30.0100.00917.35
8.0.20.0090.01117.43
8.0.10.0040.00417.07
8.0.00.0090.01117.00
7.4.330.0050.00015.55
7.4.320.0070.00016.86
7.4.300.0000.00716.95
7.4.290.0030.00316.89
7.4.280.0070.00016.83
7.4.270.0030.00316.86
7.4.260.0000.01116.77
7.4.250.0070.00016.88
7.4.240.0030.00516.84
7.4.230.0000.00816.77
7.4.220.0040.00416.97
7.4.210.0110.00716.83
7.4.200.0030.00316.99
7.4.160.0110.00816.76
7.4.140.0100.00817.86
7.4.130.0030.01417.03
7.4.120.0070.01316.87
7.4.110.0130.00316.74
7.4.100.0100.00716.79
7.4.90.0150.00316.69
7.4.80.0080.01419.39
7.4.70.0090.01216.79
7.4.60.0050.01216.73
7.4.50.0070.01016.59
7.4.40.0070.01116.82
7.4.10.0110.00614.89
7.4.00.0070.01115.21
7.3.330.0000.00613.72
7.3.320.0030.00313.53
7.3.310.0000.00716.53
7.3.300.0040.00416.57
7.3.290.0000.00716.61
7.3.280.0110.00516.68
7.3.260.0110.00816.75
7.3.240.0110.00916.70
7.3.230.0100.00616.86
7.3.210.0090.01116.97
7.3.200.0080.00816.70
7.3.190.0100.01116.75
7.3.180.0070.01016.83
7.3.170.0040.01216.66
7.3.160.0030.01216.62
7.3.130.0180.00015.13
7.3.120.0040.01315.21
7.3.110.0100.00614.98
7.3.100.0100.00615.13
7.3.90.0090.00715.24
7.3.80.0060.00515.01
7.3.70.0060.01115.03
7.3.60.0070.00814.97
7.3.50.0010.01115.18
7.3.40.0050.01015.03
7.3.30.0050.00914.99
7.3.20.0070.00416.63
7.3.10.0080.00516.99
7.3.00.0080.00416.82
7.2.330.0120.01216.74
7.2.320.0080.00817.12
7.2.310.0040.01416.91
7.2.300.0090.01516.89
7.2.290.0160.00316.93
7.2.260.0060.00915.38
7.2.250.0100.01015.27
7.2.240.0060.01015.32
7.2.230.0070.00915.19
7.2.220.0030.01015.45
7.2.210.0030.01115.38
7.2.200.0080.00515.33
7.2.190.0090.00715.25
7.2.180.0040.01015.26
7.2.170.0080.00615.13
7.2.160.0050.00815.30
7.2.150.0040.01117.03
7.2.140.0050.00717.16
7.2.130.0100.00516.95
7.2.120.0050.01117.08
7.2.110.0100.00617.10
7.2.100.0070.01017.30
7.2.90.0720.01116.14
7.2.80.0560.00816.27
7.2.70.0310.01016.53
7.2.60.0270.01316.48
7.2.50.0360.00816.60
7.2.40.0220.00616.50
7.2.30.0450.00616.54
7.2.20.0380.01316.52
7.2.10.0500.00616.29
7.2.00.0380.01416.63
7.1.330.0050.01015.83
7.1.320.0040.01115.98
7.1.310.0030.01115.87
7.1.300.0080.00816.00
7.1.290.0080.00515.83
7.1.280.0040.01016.04
7.1.270.0020.01115.74
7.1.260.0060.00815.83
7.1.250.0040.00615.78
7.1.240.0130.00415.79
7.1.230.0100.01015.95
7.1.220.0110.00416.00
7.1.210.0100.00814.85
7.1.200.0190.00715.05
7.1.190.0590.00314.83
7.1.180.0050.00914.75
7.1.170.0110.00814.94
7.1.160.0130.00314.87
7.1.150.0680.01015.00
7.1.140.0870.01115.01
7.1.130.0760.00615.17
7.1.120.0600.00314.94
7.1.110.0530.00914.99
7.1.100.0510.00715.00
7.1.90.0660.00514.98
7.1.80.1200.01114.74
7.1.70.0590.01215.05
7.1.60.0710.01623.96
7.1.50.0750.01023.84
7.1.40.1040.00524.04
7.1.30.0870.01323.90
7.1.20.1060.00824.00
7.1.10.1010.00814.71
7.1.00.0630.00814.74
7.0.330.0000.01615.73
7.0.320.0060.00315.80
7.0.310.0090.00015.44
7.0.300.0070.00715.91
7.0.290.0060.00615.56
7.0.280.0070.00415.77
7.0.270.0040.00715.46
7.0.260.0060.00615.70
7.0.250.0050.00515.57
7.0.240.0030.00615.82
7.0.230.0130.00315.67
7.0.220.0080.00315.75
7.0.210.0100.00615.84
7.0.200.0040.00815.63
7.0.190.0110.00315.76
7.0.180.0100.00315.58
7.0.170.0110.00015.71
7.0.160.0070.00715.59
7.0.150.0040.00715.49
7.0.140.0070.01115.64
7.0.130.0060.00615.75
7.0.120.0030.01015.83
7.0.110.0120.00315.64
7.0.100.0040.00415.68
7.0.90.0070.01015.68
7.0.80.0000.01015.70
7.0.70.0040.01115.63
7.0.60.0110.00415.85
7.0.50.0040.00415.61
7.0.40.0080.00813.81
7.0.30.0070.00713.71
7.0.20.0100.00313.88
7.0.10.0070.00713.25
7.0.00.0070.00713.92
5.6.400.0060.01014.43
5.6.390.0040.00714.45
5.6.380.0000.01114.56
5.6.370.0070.00714.57
5.6.360.0120.00014.32
5.6.350.0030.00614.64
5.6.340.0030.00614.39
5.6.330.0040.01114.52
5.6.320.0070.01014.72
5.6.310.0060.00914.36
5.6.300.0100.00314.72
5.6.290.0090.00914.56
5.6.280.0120.00314.73
5.6.270.0030.01014.29
5.6.260.0120.00314.63
5.6.250.0030.01014.42
5.6.240.0060.00314.70
5.6.230.0040.00814.33
5.6.220.0030.00914.53
5.6.210.0070.00714.66
5.6.200.0070.00714.70
5.6.190.0030.01314.36
5.6.180.0030.01414.49
5.6.170.0030.00914.58
5.6.160.0070.00714.63
5.6.150.0120.00414.71
5.6.140.0060.00314.45
5.6.130.0000.01314.77
5.6.120.0060.00914.71
5.6.110.0100.00614.59
5.6.100.0090.00614.51
5.6.90.0120.00314.38
5.6.80.0060.00314.45
5.6.70.0070.00314.36
5.6.60.0030.00914.13
5.6.50.0000.01214.54
5.6.40.0060.00614.73
5.6.30.0060.00914.18
5.6.20.0040.00414.80
5.6.10.0040.00414.38
5.6.00.0000.01114.60

preferences:
30.84 ms | 401 KiB | 5 Q