3v4l.org

run code in 300+ PHP versions simultaneously
<?php $student_comment_new = 'PDE+PEwuSW50cm9kdWN0aW9uIC0gUGFnZSAxIG9mIDI+TVkgUFJFVEVORCBTRUNPTkQgPGUuMT4='; $fixed = base64_decode($student_comment_new); echo $fixed . "\n\n"; //Decode the entire comment $comment_cltxt = base64_decode($student_comment_new); echo $comment_cltxt . "\n\n"; //get the comment number. $comment_nr = explode('><L.', $comment_cltxt)[0]; $comment_nr = explode('<', $comment_nr)[1]; //get the comment end-text $comment_nr_string = '<' . $comment_nr . '>'; $comment_end_string = '<e.' . $comment_nr . '>'; echo $comment_nr . "\n"; echo $comment_nr_string . "\n"; echo $comment_end_string . "\n"; //get the comment text itself $pos1 = strlen($comment_nr_string); $pos2 = strlen($comment_end_string); $comment_text = substr($comment_cltxt, $pos1, -$pos2); echo $comment_text . "\n";

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.0110.01118.25
8.3.60.0040.01116.63
8.3.50.0170.00722.05
8.3.40.0060.00918.75
8.3.30.0070.00718.71
8.3.20.0040.00420.34
8.3.10.0050.00323.66
8.3.00.0000.00919.26
8.2.180.0070.00716.38
8.2.170.0110.00422.96
8.2.160.0070.00720.35
8.2.150.0040.00224.18
8.2.140.0040.00424.66
8.2.130.0030.00517.50
8.2.120.0060.00326.35
8.2.110.0100.00020.99
8.2.100.0110.00017.91
8.2.90.0000.00818.34
8.2.80.0040.00418.16
8.2.70.0050.00317.93
8.2.60.0060.00317.93
8.2.50.0050.00318.10
8.2.40.0000.00820.52
8.2.30.0000.00720.52
8.2.20.0030.00617.62
8.2.10.0070.00018.22
8.2.00.0070.00018.14
8.1.280.0140.00325.92
8.1.270.0050.00323.88
8.1.260.0050.00328.09
8.1.250.0040.00428.09
8.1.240.0070.01023.86
8.1.230.0070.00420.77
8.1.220.0040.00417.76
8.1.210.0040.00418.77
8.1.200.0040.00417.35
8.1.190.0040.00417.23
8.1.180.0040.00418.10
8.1.170.0060.00318.45
8.1.160.0000.00722.13
8.1.150.0050.00318.78
8.1.140.0030.00519.56
8.1.130.0020.00517.71
8.1.120.0000.00717.35
8.1.110.0040.00417.50
8.1.100.0020.00517.43
8.1.90.0030.00317.39
8.1.80.0000.00717.41
8.1.70.0030.00317.36
8.1.60.0060.00317.58
8.1.50.0040.00417.57
8.1.40.0040.00417.36
8.1.30.0040.00417.67
8.1.20.0000.00717.45
8.1.10.0000.00817.53
8.1.00.0030.00617.49
8.0.300.0070.00020.04
8.0.290.0020.00516.75
8.0.280.0040.00418.44
8.0.270.0000.00817.15
8.0.260.0060.00017.23
8.0.250.0030.00316.88
8.0.240.0040.00416.95
8.0.230.0040.00416.94
8.0.220.0030.00316.91
8.0.210.0000.00916.82
8.0.200.0070.00016.91
8.0.190.0060.00316.81
8.0.180.0040.00416.95
8.0.170.0070.00316.73
8.0.160.0040.00316.95
8.0.150.0070.00016.89
8.0.140.0030.00516.71
8.0.130.0060.00013.32
8.0.120.0090.00016.88
8.0.110.0040.00416.88
8.0.100.0070.00016.80
8.0.90.0000.00716.70
8.0.80.0070.01016.89
8.0.70.0040.00416.71
8.0.60.0070.00016.70
8.0.50.0060.00316.91
8.0.30.0120.00716.89
8.0.20.0080.01317.40
8.0.10.0050.00316.79
8.0.00.0050.01316.72
7.4.330.0000.00516.70
7.4.320.0000.00616.29
7.4.300.0030.00316.41
7.4.290.0000.00716.50
7.4.280.0040.00416.43
7.4.270.0040.00416.51
7.4.260.0040.00416.37
7.4.250.0000.00716.53
7.4.240.0040.00416.43
7.4.230.0020.00516.28
7.4.220.0170.00716.45
7.4.210.0070.00716.60
7.4.200.0040.00416.46
7.4.160.0040.01116.42
7.4.150.0200.00417.40
7.4.140.0090.00917.86
7.4.130.0120.00716.61
7.4.120.0090.00916.40
7.4.110.0070.01116.71
7.4.100.0120.00916.46
7.4.90.0110.00616.46
7.4.80.0130.00319.39
7.4.70.0130.01016.55
7.4.60.0130.00316.42
7.4.50.0100.00716.40
7.4.40.0090.00916.43
7.4.30.0120.00816.61
7.4.00.0100.00614.84
7.3.330.0030.00313.25
7.3.320.0050.00313.12
7.3.310.0070.00016.40
7.3.300.0070.00016.37
7.3.290.0060.01016.30
7.3.280.0080.00916.35
7.3.270.0130.00717.40
7.3.260.0170.00316.31
7.3.250.0070.01216.33
7.3.240.0080.01216.33
7.3.230.0110.00516.52
7.3.210.0070.01016.39
7.3.200.0120.01216.37
7.3.190.0150.00616.22
7.3.180.0160.00616.22
7.3.170.0100.01316.59
7.3.160.0150.00616.68
7.3.120.0110.00714.83
7.3.110.0060.00914.68
7.3.100.0060.00615.00
7.3.90.0070.00714.60
7.3.80.0040.01215.05
7.3.70.0030.01314.80
7.3.60.0100.00314.79
7.3.50.0080.00814.88
7.3.40.0110.00414.77
7.3.30.0030.00514.63
7.3.20.0080.00616.74
7.3.10.0110.00616.45
7.3.00.0120.00516.56
7.2.330.0120.00416.79
7.2.320.0180.00616.82
7.2.310.0070.01116.63
7.2.300.0060.01816.52
7.2.290.0090.00916.63
7.2.250.0130.00614.96
7.2.240.0090.00915.07
7.2.230.0060.01215.29
7.2.220.0100.00715.15
7.2.210.0030.01015.23
7.2.200.0070.01115.04
7.2.190.0030.01014.80
7.2.180.0030.01315.01
7.2.170.0030.01015.05
7.2.130.0100.01116.85
7.2.120.0100.00716.82
7.2.110.0140.00516.63
7.2.100.0130.00916.69
7.2.90.0160.00616.73
7.2.80.0120.00816.67
7.2.70.0120.00716.66
7.2.60.0100.00816.66
7.2.50.0120.00516.68
7.2.40.0090.01016.63
7.2.30.0080.00716.90
7.2.20.0120.00516.79
7.2.10.0110.00516.72
7.2.00.0070.01017.75
7.1.330.0040.01115.95
7.1.320.0090.00615.98
7.1.310.0090.00915.79
7.1.300.0040.01115.83
7.1.290.0000.01516.00
7.1.280.0060.00615.71
7.1.270.0000.01515.77
7.1.260.0090.00615.75
7.1.250.0130.00415.52
7.1.100.0000.01118.39
7.1.70.0040.00417.13
7.1.60.0090.01219.12
7.1.50.0000.02416.68
7.1.00.0070.07022.30
7.0.200.0130.00915.14
7.0.100.0070.07321.80
7.0.90.0070.04021.73
7.0.80.0170.06321.70
7.0.70.0070.08021.76
7.0.60.0100.05321.77
7.0.50.0030.05322.06
7.0.40.0100.07719.96
7.0.30.0030.08720.07
7.0.20.0200.07320.18
7.0.10.0070.07720.02
7.0.00.0100.08320.17
5.6.280.0030.06321.10
5.6.250.0100.06320.59
5.6.240.0000.09020.63
5.6.230.0130.06720.68
5.6.220.0000.08020.61
5.6.210.0100.07320.75
5.6.200.0070.08321.03
5.6.190.0070.06021.16
5.6.180.0070.07721.04
5.6.170.0070.08720.95
5.6.160.0130.07721.04
5.6.150.0030.06321.02
5.6.140.0130.07320.95
5.6.130.0130.07721.01
5.6.120.0170.07321.02
5.6.110.0030.08720.99
5.6.100.0170.07721.02
5.6.90.0130.07721.01
5.6.80.0100.07020.32
5.6.70.0100.08320.45
5.6.60.0000.08720.38
5.6.50.0030.08020.54
5.6.40.0100.07720.47
5.6.30.0070.07020.30
5.6.20.0100.07720.48
5.6.10.0130.07720.39
5.6.00.0100.06020.37
5.5.380.0170.07020.56
5.5.370.0170.07020.40
5.5.360.0030.08320.34
5.5.350.0070.08320.35
5.5.340.0030.08720.64
5.5.330.0100.08020.73
5.5.320.0030.08320.78
5.5.310.0070.08020.80
5.5.300.0130.07320.83
5.5.290.0200.07020.73
5.5.280.0130.07720.77
5.5.270.0030.09020.80
5.5.260.0070.08720.90
5.5.250.0130.08020.59
5.5.240.0130.06320.02
5.5.230.0100.07720.30
5.5.220.0100.06720.26
5.5.210.0130.07720.15
5.5.200.0000.08020.15
5.5.190.0100.08020.12
5.5.180.0070.07720.14
5.5.160.0070.06720.17
5.5.150.0100.06020.25
5.5.140.0130.06020.26
5.5.130.0200.07020.14
5.5.120.0100.04320.17
5.5.110.0030.07719.98
5.5.100.0100.05020.16
5.5.90.0030.06320.07
5.5.80.0100.06720.03
5.5.70.0030.08020.11
5.5.60.0030.08319.89
5.5.50.0170.07720.05
5.5.40.0030.07719.95
5.5.30.0100.06020.07
5.5.20.0070.08720.14
5.5.10.0000.06020.04
5.5.00.0070.08719.98

preferences:
56.49 ms | 401 KiB | 5 Q