3v4l.org

run code in 300+ PHP versions simultaneously
<?php function cleanSniffClass($sniffClass) { $newName = strtolower($sniffClass); var_dump(strlen($newName)); var_dump(strrpos($newName, '\sniffs\\')); $end = (strlen($newName) - strrpos($newName, '\sniffs\\') + 1); var_dump($end); $start = strrpos($newName, '\\', ($end * -1)); var_dump($start); $newName = substr($newName, ($start + 1)); var_dump($newName); return $newName; } var_dump(cleanSniffClass('X\A\Sniffs\Cat\Name')); var_dump(cleanSniffClass('PHPCompatibility\Sniffs\Cat\Name'));

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.130.0000.00818.26
8.3.120.0040.00418.85
8.3.110.0000.00820.94
8.3.100.0060.00316.73
8.3.90.0120.00626.77
8.3.80.0060.00318.31
8.3.70.0060.01216.25
8.3.60.0120.00318.18
8.3.50.0080.00821.27
8.3.40.0160.00717.90
8.3.30.0180.00518.01
8.3.20.0110.00818.61
8.3.10.0150.00419.51
8.3.00.0120.00719.88
8.2.250.0000.00918.50
8.2.240.0040.01117.34
8.2.230.0080.01122.58
8.2.220.0030.00637.54
8.2.210.0030.00526.77
8.2.200.0090.00016.63
8.2.190.0180.00016.58
8.2.180.0260.00715.85
8.2.170.0120.01220.28
8.2.160.0210.00519.36
8.2.150.0130.00720.70
8.2.140.0200.00220.96
8.2.130.0170.00518.77
8.2.120.0180.00321.93
8.2.110.0130.00918.86
8.2.100.0170.00617.67
8.2.90.0200.00318.27
8.2.80.0130.00717.66
8.2.70.0150.00817.44
8.2.60.0200.00217.58
8.2.50.0160.00717.67
8.2.40.0100.01018.92
8.2.30.0170.00318.18
8.2.20.0150.00417.70
8.2.10.0130.00717.53
8.2.00.0130.00717.74
8.1.300.0060.00317.93
8.1.290.0060.00330.84
8.1.280.0300.00315.50
8.1.270.0030.00921.38
8.1.260.0130.00921.73
8.1.250.0170.00522.67
8.1.240.0190.00120.45
8.1.230.0160.00619.55
8.1.220.0120.00717.49
8.1.210.0130.00617.94
8.1.200.0170.00417.18
8.1.190.0160.00417.04
8.1.180.0160.00417.49
8.1.170.0130.00817.58
8.1.160.0130.00717.82
8.1.150.0130.00618.56
8.1.140.0140.00618.29
8.1.130.0160.00417.90
8.1.120.0130.00717.09
8.1.110.0130.00617.19
8.1.100.0120.00717.08
8.1.90.0130.00717.19
8.1.80.0130.00617.07
8.1.70.0130.00617.22
8.1.60.0140.00817.40
8.1.50.0140.00617.33
8.1.40.0150.00617.32
8.1.30.0120.00917.44
8.1.20.0140.00917.45
8.1.10.0140.00617.27
8.1.00.0110.01217.14
8.0.300.0170.00317.57
8.0.290.0140.00616.63
8.0.280.0140.00317.30
8.0.270.0130.00816.73
8.0.260.0110.00817.82
8.0.250.0190.00016.70
8.0.240.0140.00516.74
8.0.230.0130.00616.64
8.0.220.0160.00416.63
8.0.210.0170.00416.74
8.0.200.0140.00616.67
8.0.190.0120.00616.62
8.0.180.0130.00716.65
8.0.170.0120.00916.59
8.0.160.0150.00416.47
8.0.150.0150.00416.64
8.0.140.0140.00516.57
8.0.130.0150.00514.73
8.0.120.0150.00616.55
8.0.110.0130.00716.70
8.0.100.0130.00816.70
8.0.90.0160.00616.54
8.0.80.0230.00216.65
8.0.70.0150.00816.45
8.0.60.0130.00816.72
8.0.50.0150.00516.56
8.0.30.0140.00716.64
8.0.20.0130.00817.22
8.0.10.0120.00916.63
8.0.00.0130.00816.84
7.4.330.0170.00215.84
7.4.320.0120.00816.24
7.4.300.0150.00416.28
7.4.290.0100.00816.37
7.4.280.0140.00516.16
7.4.270.0140.00516.21
7.4.260.0120.00516.46
7.4.250.0130.00916.22
7.4.240.0130.01116.27
7.4.230.0140.00816.30
7.4.220.0210.00916.41
7.4.210.0130.00716.43
7.4.200.0190.00416.31
7.4.190.0280.00416.00
7.4.180.0220.00716.13
7.4.160.0110.01016.81
7.4.150.0120.01116.75
7.4.140.0170.00617.42
7.4.130.0120.01116.37
7.4.120.0170.00816.40
7.4.110.0170.00516.34
7.4.100.0140.01316.53
7.4.90.0170.00716.31
7.4.80.0160.01017.62
7.4.70.0170.00616.18
7.4.60.0130.00916.39
7.4.50.0170.00516.24
7.4.40.0150.01016.10
7.4.30.0140.01217.21
7.4.20.0240.00316.13
7.4.10.0260.00416.25
7.4.00.0090.01115.26
7.3.330.0130.00414.68
7.3.320.0130.00415.58
7.3.310.0090.00716.10
7.3.300.0130.00516.26
7.3.290.0190.00516.19
7.3.280.0120.00716.26
7.3.270.0140.00817.57
7.3.260.0160.00816.38
7.3.250.0260.00315.75
7.3.240.0170.00816.31
7.3.230.0150.01016.09
7.3.220.0270.00515.88
7.3.210.0200.00816.32
7.3.200.0170.01216.13
7.3.190.0210.00416.21
7.3.180.0150.00816.32
7.3.170.0170.00716.26
7.3.160.0150.01016.13
7.3.150.0170.01116.00
7.3.140.0300.00015.73
7.3.130.0320.00015.88
7.3.120.0310.00015.75
7.3.110.0260.00415.86
7.3.100.0240.00815.63
7.3.90.0220.01016.13
7.3.80.0230.00915.63
7.3.70.0190.00816.13
7.3.60.0210.00716.13
7.3.50.0170.01316.13
7.3.40.0180.00915.75
7.3.30.0180.01115.88
7.3.20.0260.00317.89
7.3.10.0160.00917.07
7.3.00.0110.00916.93
7.2.340.0160.01216.38
7.2.330.0090.01216.48
7.2.320.0180.00816.32
7.2.310.0150.00716.27
7.2.300.0150.00816.13
7.2.290.0160.00616.31
7.2.280.0130.01315.75
7.2.270.0220.00915.88
7.2.260.0220.00616.13
7.2.250.0300.00716.00
7.2.240.0350.00716.00
7.2.230.0260.01015.88
7.2.220.0330.01015.88
7.2.210.0300.00616.00
7.2.200.0290.01116.25
7.2.190.0190.01516.25
7.2.180.0330.00716.13
7.2.170.0280.00416.00
7.2.160.0290.00316.38
7.2.150.0320.00017.90
7.2.140.0290.00018.13
7.2.130.0150.00617.16
7.2.120.0120.00917.14
7.2.110.0190.00617.18
7.2.100.0150.00417.04
7.2.90.0080.01017.24
7.2.80.0180.00617.16
7.2.70.0150.00817.12
7.2.60.0190.00717.01
7.2.50.0190.00717.19
7.2.40.0130.01117.06
7.2.30.0190.00417.01
7.2.20.0190.00617.28
7.2.10.0190.00617.14
7.2.00.0160.00617.07
7.1.330.0220.00316.82
7.1.320.0240.00417.07
7.1.310.0210.00816.86
7.1.300.0220.00417.11
7.1.290.0220.00616.75
7.1.280.0230.00616.99
7.1.270.0270.00016.98
7.1.260.0220.00516.98
7.1.250.0120.00716.09
7.1.240.0130.00716.44
7.1.230.0160.00516.25
7.1.220.0150.00316.20
7.1.210.0110.00816.35
7.1.200.0100.00716.20
7.1.190.0090.01216.16
7.1.180.0100.00916.26
7.1.170.0160.00416.23
7.1.160.0170.00316.13
7.1.150.0160.00516.40
7.1.140.0150.00616.03
7.1.130.0130.00716.33
7.1.120.0130.00716.38
7.1.110.0110.00916.25
7.1.100.0140.00516.26
7.1.90.0070.01416.29
7.1.80.0120.00816.34
7.1.70.0070.01016.43
7.1.60.0120.00616.49
7.1.50.0160.00516.24
7.1.40.0290.00921.78
7.1.30.0390.00721.76
7.1.20.0320.00821.79
7.1.10.0360.00615.70
7.1.00.0340.00715.73
7.0.330.0120.00916.02
7.0.320.0100.00715.92
7.0.310.0130.00515.90
7.0.300.0100.00615.83
7.0.290.0150.00516.09
7.0.280.0130.00615.95
7.0.270.0080.00915.95
7.0.260.0090.00916.04
7.0.250.0120.00816.03
7.0.240.0130.00716.09
7.0.230.0100.00916.06
7.0.220.0140.00315.99
7.0.210.0090.00915.88
7.0.200.0100.00816.32
7.0.190.0100.00916.07
7.0.180.0280.00715.57
7.0.170.0360.00715.38
7.0.160.0360.00715.28
7.0.150.0380.00615.39
7.0.140.0370.00715.41
7.0.130.0350.00615.35
7.0.120.0340.00715.61
7.0.110.0430.00715.35
7.0.100.0330.00715.39
7.0.90.0350.00315.31
7.0.80.0330.00715.50
7.0.70.0310.00715.47
7.0.60.0340.00515.36
7.0.50.0280.01015.54
7.0.40.0510.00614.83
7.0.30.0320.00714.86
7.0.20.0270.00814.77
7.0.10.0350.00814.80
7.0.00.0310.00614.67
5.6.400.0220.00415.50
5.6.390.0190.00515.63
5.6.380.0100.00714.88
5.6.370.0250.00415.38
5.6.360.0210.00915.50
5.6.350.0230.00815.25
5.6.340.0220.00715.50
5.6.330.0220.00715.50
5.6.320.0240.00615.38
5.6.310.0180.01215.50
5.6.300.0240.00315.50
5.6.290.0130.01315.38
5.6.280.0250.00615.50
5.6.270.0220.00615.38
5.6.260.0270.00315.63
5.6.250.0210.01015.38
5.6.240.0210.01015.50
5.6.230.0210.00915.38
5.6.220.0190.01115.50
5.6.210.0160.01215.50
5.6.200.0190.00615.50
5.6.190.0190.00915.50
5.6.180.0230.00315.63
5.6.170.0180.01115.75
5.6.160.0280.00015.38
5.6.150.0230.00815.50
5.6.140.0290.00315.38
5.6.130.0230.00715.63
5.6.120.0180.01115.50
5.6.110.0220.00715.25
5.6.100.0200.00715.75
5.6.90.0260.00415.25
5.6.80.0230.00315.38
5.6.70.0280.00015.63
5.6.60.0210.00415.63
5.6.50.0220.00415.25
5.6.40.0210.00615.38
5.6.30.0180.00715.63
5.6.20.0180.00915.25
5.6.10.0140.01015.25
5.6.00.0210.00315.38

preferences:
55.7 ms | 403 KiB | 5 Q