3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(0); function x($v){ $argv[1] = $v; echo strlen((explode('.',$t=trim('-'==($_=$argv[1])[0]?$n=$_=trim($_,'-'):$_,0)))[1]).($t!==$_?($n?' -':' ').('.'==$t[0]?0:'').trim($t,'.'):''); echo "\n"; } x('-12.32'); x('32'); x('3231.432'); x('-34.0'); x('023'); x('00324.230'); x('10'); x('00.3'); x('0'); x('-0'); x('-0.0'); x('-04.8330'); x('-000000000012345678901234567890000.000012345678901234567890000');

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.1.60.0080.00017.54
8.1.50.0030.00617.46
8.1.40.0030.00617.41
8.1.30.0040.00417.55
8.1.20.0000.00717.55
8.1.10.0000.00817.56
8.1.00.0070.00017.50
8.0.190.0080.00016.96
8.0.180.0050.00216.95
8.0.170.0040.00416.90
8.0.160.0040.00417.00
8.0.150.0040.00716.80
8.0.140.0000.00716.89
8.0.130.0000.00613.38
8.0.120.0000.00916.92
8.0.110.0040.00417.00
8.0.100.0030.00316.91
8.0.90.0040.00416.80
8.0.80.0080.00716.93
8.0.70.0040.00416.99
8.0.60.0000.00816.91
8.0.50.0040.00416.76
8.0.30.0130.00817.09
8.0.20.0140.00717.40
8.0.10.0000.00716.97
8.0.00.0100.00716.84
7.4.290.0000.00716.64
7.4.280.0000.00716.60
7.4.270.0070.00316.60
7.4.260.0030.00316.44
7.4.250.0030.00316.57
7.4.240.0000.00816.59
7.4.230.0060.00316.70
7.4.220.0160.00316.63
7.4.210.0070.00716.59
7.4.200.0030.00316.62
7.4.160.0090.00916.36
7.4.150.0140.00517.40
7.4.140.0070.01217.86
7.4.130.0100.00816.58
7.4.120.0090.00916.42
7.4.110.0030.01316.61
7.4.100.0080.01116.50
7.4.90.0120.01216.68
7.4.80.0130.00619.39
7.4.70.0030.01516.67
7.4.60.0070.01016.51
7.4.50.0120.00616.44
7.4.40.0040.01416.65
7.4.30.0200.00316.34
7.4.00.0050.01214.91
7.3.330.0050.00013.21
7.3.320.0030.00313.43
7.3.310.0080.00016.48
7.3.300.0070.00016.31
7.3.290.0070.00016.44
7.3.280.0110.00516.40
7.3.270.0060.01317.40
7.3.260.0100.00716.40
7.3.250.0100.00816.47
7.3.240.0100.00716.49
7.3.230.0060.01216.41
7.3.210.0120.00916.42
7.3.200.0110.00819.39
7.3.190.0100.00616.45
7.3.180.0080.00816.53
7.3.170.0110.00516.48
7.3.160.0030.01316.45
7.3.120.0050.01214.83
7.3.110.0070.00814.92
7.3.100.0100.00514.91
7.3.90.0070.00714.73
7.3.80.0070.00714.67
7.3.70.0050.01014.77
7.3.60.0050.00714.82
7.3.50.0050.00914.97
7.3.40.0060.00714.69
7.3.30.0080.00314.68
7.3.20.0040.00916.58
7.3.10.0090.00716.62
7.3.00.0040.00816.59
7.2.330.0110.00716.45
7.2.320.0110.00716.40
7.2.310.0080.01216.67
7.2.300.0100.00716.54
7.2.290.0170.00016.95
7.2.250.0090.00915.02
7.2.240.0100.00915.08
7.2.230.0010.01215.18
7.2.220.0040.00915.09
7.2.210.0020.01015.04
7.2.200.0060.00615.25
7.2.190.0060.01014.89
7.2.180.0080.00715.10
7.2.170.0050.00914.88
7.2.160.0040.01115.01
7.2.150.0040.01116.73
7.2.140.0090.00616.82
7.2.130.0060.01016.80
7.2.120.0050.01116.90
7.2.110.0000.01616.77
7.2.100.0080.00616.76
7.2.90.0030.01216.77
7.2.80.0120.00216.90
7.2.70.0030.00916.76
7.2.60.0070.00816.94
7.2.50.0080.00516.96
7.2.40.0080.00516.79
7.2.30.0060.01017.00
7.2.20.0040.00916.73
7.2.10.0060.00916.91
7.2.00.0070.01117.76
7.1.330.0070.00715.65
7.1.320.0070.00715.74
7.1.310.0060.00815.72
7.1.300.0040.01215.80
7.1.290.0050.00615.81
7.1.280.0070.00515.84
7.1.270.0060.00815.59
7.1.260.0090.00515.73
7.1.250.0060.00615.81
7.1.200.0180.00415.55
7.1.100.0000.01417.82
7.1.70.0040.00717.26
7.1.60.0040.02119.40
7.1.50.0100.01017.04
7.1.00.0130.06722.45
7.0.200.0270.00315.18
7.0.60.0230.07321.73
7.0.50.0100.04317.93
7.0.40.0070.08020.09
7.0.30.0370.06720.09
7.0.20.0270.04720.21
7.0.10.0070.04020.25
7.0.00.0100.08320.20
5.6.280.0030.07320.95
5.6.210.0130.08020.61
5.6.200.0030.04018.16
5.6.190.0100.07020.61
5.6.180.0230.05720.63
5.6.170.0300.07020.74
5.6.160.0030.05020.43
5.6.150.0070.08018.16
5.6.140.0030.07018.23
5.6.130.0030.07018.28
5.6.120.0170.07321.13
5.6.110.0070.08721.12
5.6.100.0030.04320.99
5.6.90.0030.04020.95
5.6.80.0130.07720.36
5.5.350.0130.08320.44
5.5.340.0030.05318.09
5.5.330.0000.05320.42
5.5.320.0400.06720.36
5.5.310.0230.03320.24
5.5.300.0070.04017.98
5.5.290.0130.07018.03
5.5.280.0100.07320.77
5.5.270.0100.07020.97
5.5.260.0170.07320.77
5.5.250.0070.05320.75
5.5.240.0330.05720.19

preferences:
22.82 ms | 406 KiB | 5 Q