3v4l.org

run code in 500+ PHP versions simultaneously
<?php $input = 'Yth. ErzaPay.com (DS008206). Sal:465.670, Dlm proses:0. Pemakaian hr ini:126.885 Komisi:0 #*IDN1,IDN3 Open harga naik'; echo preg_match('~Sal:\K[^,]+~', $input, $out) ? $out[0] : 'no match'; echo "\n---\n"; echo preg_replace('~^.*?Sal:|,.*?$~', '', $input); echo "\n---\n"; echo strstr(explode('Sal:', $input, 2)[1], ',', true); echo "\n---\n"; echo explode(',', explode('Sal:', $input, 2)[1], 2)[0]; echo "\n---\n"; if (($startPos = strpos($input, 'Sal:')) !== false && ($endPos = strpos($input, ',', $startPos)) !== false) { $substrPos = $startPos + 4; $substrLen = $endPos - $substrPos; echo substr($input, $substrPos, $substrLen); }

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.5.70.0090.00916.83
8.5.60.0100.00818.79
8.5.50.0090.00916.98
8.5.30.0180.00317.40
8.5.20.0070.01219.41
8.5.10.0090.00916.85
8.5.00.0120.01020.08
8.4.220.0140.00719.74
8.4.210.0120.01020.02
8.4.180.0130.01020.05
8.4.170.0160.00620.55
8.4.160.0070.01423.96
8.4.150.0070.00516.96
8.4.140.0180.01317.77
8.4.130.0120.01018.06
8.4.120.0110.01020.71
8.4.110.0140.00718.84
8.4.100.0140.00718.08
8.4.90.0130.00817.78
8.4.80.0040.00519.71
8.4.70.0090.00418.23
8.4.60.0120.00918.74
8.4.50.0040.00618.81
8.4.40.0000.01420.86
8.4.30.0060.01324.00
8.4.20.0070.01019.00
8.4.10.0030.00717.71
8.3.310.0100.00718.82
8.3.300.0130.00820.94
8.3.290.0120.00920.75
8.3.280.0150.00618.71
8.3.270.0110.00816.96
8.3.260.0110.00816.66
8.3.250.0060.01219.12
8.3.240.0070.00316.71
8.3.230.0070.01316.52
8.3.220.0140.00418.92
8.3.210.0120.00918.46
8.3.200.0080.00116.65
8.3.190.0090.01120.85
8.3.180.0080.01116.76
8.3.170.0190.00017.27
8.3.160.0030.00620.51
8.3.150.0100.01018.82
8.3.140.0070.00419.04
8.3.130.0030.00518.58
8.3.120.0030.00619.18
8.3.110.0090.00016.67
8.3.100.0000.00816.97
8.3.90.0080.00018.61
8.3.80.0000.00917.97
8.3.70.0090.01216.88
8.3.60.0160.00318.51
8.3.50.0120.00921.42
8.3.40.0040.01119.10
8.3.30.0120.00318.96
8.3.20.0000.01521.87
8.3.10.0050.00322.08
8.3.00.0050.00323.61
8.2.300.0080.01222.00
8.2.290.0140.00520.59
8.2.280.0140.00518.65
8.2.270.0170.00318.91
8.2.260.0150.00416.68
8.2.250.0120.00318.38
8.2.240.0070.00717.25
8.2.230.0150.00620.94
8.2.220.0060.00337.54
8.2.210.0040.00426.77
8.2.200.0030.00616.63
8.2.190.0080.00818.66
8.2.180.0120.00316.73
8.2.170.0060.00922.96
8.2.160.0130.00720.35
8.2.150.0080.00024.18
8.2.140.0050.00324.66
8.2.130.0030.00526.16
8.2.120.0110.00426.16
8.2.110.0090.00019.31
8.2.100.0060.00618.16
8.2.90.0040.00419.32
8.2.80.0040.00417.97
8.2.70.0040.00417.88
8.2.60.0040.00418.16
8.2.50.0000.00818.07
8.2.40.0000.00818.15
8.2.30.0000.00818.18
8.2.20.0000.00718.05
8.2.10.0030.00621.03
8.2.00.0000.00920.66
8.1.340.0140.00921.57
8.1.330.0110.00816.71
8.1.320.0100.00916.37
8.1.310.0000.00718.51
8.1.300.0100.01016.90
8.1.290.0030.00618.88
8.1.280.0140.00425.92
8.1.270.0030.00522.06
8.1.260.0000.00826.35
8.1.250.0030.00528.09
8.1.240.0140.00322.61
8.1.230.0070.00417.83
8.1.220.0040.00417.75
8.1.210.0000.00818.77
8.1.200.0000.00817.48
8.1.190.0030.00517.35
8.1.180.0040.00418.10
8.1.170.0030.00518.74
8.1.160.0020.00518.90
8.1.150.0050.00218.94
8.1.140.0020.00522.12
8.1.130.0070.00020.19
8.1.120.0080.00317.68
8.1.110.0040.00717.63
8.1.100.0040.00417.68
8.1.90.0000.00817.52
8.1.80.0000.00817.62
8.1.70.0040.00417.63
8.1.60.0080.00017.75
8.1.50.0040.00417.72
8.1.40.0030.00617.59
8.1.30.0050.00317.76
8.1.20.0000.01217.82
8.1.10.0040.00417.73
8.1.00.0050.00217.57
8.0.300.0050.00318.77
8.0.290.0080.00017.13
8.0.280.0000.00718.41
8.0.270.0050.00317.33
8.0.260.0000.00620.10
8.0.250.0000.00717.14
8.0.240.0000.01017.00
8.0.230.0000.00717.16
8.0.220.0040.00417.07
8.0.210.0040.00417.07
8.0.200.0030.00717.07
8.0.190.0040.00417.12
8.0.180.0070.00017.09
8.0.170.0050.00317.07
8.0.160.0030.00617.09
8.0.150.0030.00316.97
8.0.140.0070.00016.96
8.0.130.0000.00513.42
8.0.120.0000.00717.07
8.0.110.0040.00416.88
8.0.100.0000.00816.96
8.0.90.0040.00417.04
8.0.80.0090.01617.07
8.0.70.0050.00316.95
8.0.60.0040.00416.89
8.0.50.0000.00717.01
8.0.30.0150.00317.59
8.0.20.0090.00916.89
8.0.10.0080.00017.18
8.0.00.0120.00717.08
7.4.330.0050.00015.55
7.4.320.0070.00016.73
7.4.300.0060.00016.84
7.4.290.0000.00816.74
7.4.280.0030.00316.78
7.4.270.0040.00416.74
7.4.260.0000.00716.80
7.4.250.0050.00316.71
7.4.240.0050.00216.68
7.4.230.0080.00016.63
7.4.220.0030.00316.79
7.4.210.0100.00616.75
7.4.200.0000.00716.60
7.4.130.0190.00316.65
7.4.120.0080.01916.62
7.4.110.0160.00316.68
7.4.100.0040.01416.92
7.4.90.0080.00816.47
7.4.80.0100.00919.39
7.4.70.0060.00916.73
7.4.60.0090.00916.69
7.4.50.0030.01216.52
7.4.40.0070.01016.85
7.4.00.0060.00915.03
7.3.330.0040.00413.35
7.3.320.0030.00313.31
7.3.310.0070.00016.57
7.3.300.0030.00316.55
7.3.290.0030.00316.49
7.3.280.0070.01016.53
7.3.260.0110.00716.64
7.3.230.0160.00616.81
7.3.210.0100.00616.50
7.3.200.0070.01616.54
7.3.190.0190.00316.68
7.3.180.0060.00916.50
7.3.170.0090.00616.63
7.3.160.0120.00316.67
7.3.70.0100.01014.91
7.3.60.0070.00715.13
7.3.50.0030.01214.78
7.3.40.0080.00314.81
7.3.30.0130.01015.06
7.3.20.0000.01116.94
7.3.10.0000.01516.81
7.3.00.0060.00616.60
7.2.330.0100.01016.64
7.2.320.0150.00916.73
7.2.310.0000.01816.80
7.2.300.0100.01316.83
7.2.290.0120.00416.78
7.2.200.0110.00915.27
7.2.190.0140.01015.21
7.2.180.0070.00715.20
7.2.170.0080.01115.25
7.2.160.0100.01315.29
7.2.150.0040.01117.14
7.2.140.0070.01416.96
7.2.130.0040.01217.22
7.2.120.0090.01517.04
7.2.110.0030.00916.78
7.2.100.0060.00916.96
7.2.90.0090.00317.13
7.2.80.0050.00617.16
7.2.70.0030.00917.09
7.2.60.0090.00316.77
7.2.50.0090.00317.08
7.2.40.0140.00317.09
7.2.30.0060.00617.14
7.2.20.0040.00817.08
7.2.10.0050.01016.79
7.2.00.0070.00716.97
7.1.300.0100.01115.84
7.1.290.0030.00916.01
7.1.280.0110.01116.16
7.1.270.0090.00916.14
7.1.260.0090.01015.79
7.1.250.0080.00316.07

preferences:
95.1 ms | 1453 KiB | 5 Q