<commit_before><?php require( __DIR__ . '/public/includes/header.php');?>

    <div class="container clearfix">
        <div class="row">
            <div class="col-xs-12">
                
                <div class="panel panel-default">
                    
                    <div class="panel-heading">
                        <h1>Regex Playground</h1>
                        <h1>&amp;</h1>
                        <h2>Random Php Functions</h2>
                    </div>
                    
                    <div class="panel-body">
                        <?php 
                        
                        $string = 'abcdefghijklmnopqrstuvwxyz';
                        $find = strrpos( $string, 'c' );
                          
                        ?>
                        
                        <?php if( $find === false ): ?>
                            
                            <?php echo 'Your variable was not in the string'; ?>
                            
                        <?php else: ?>
                        
                            <?php echo 'Your variable was found in the string'; ?>
                            
                        <?php endif; ?>
                            
                        <br>
                        
                        <!-- variable -->
                        <?php $reg = preg_match( '/z$/i', $string ); ?>
                        
                        <!-- check if preg_match -->
                        <?php if( $reg === 0 ): ?>
                        
                            <?php echo 'Match not found'; ?>
                            
                        <?php else: ?>
                        
                            <?php echo 'Match found yaaaay'; ?>
                            
                        <?php endif; ?>
                        
                        <br>
                        
                        <div class="col-xs-12">
                        
                            <p>Here I am just playing around with an array</p>
                            <?php
                            
                            $country = [ 
                            
                                'United States' => 'DC',
                                'Canada'        => 'Ontario',
                                'Mexico'        => 'Taco',
                                'Germany'       => 'Munich',
                                'Korea'         => 'Seoul'
                             
                            ];
                            
                            $country[] = ['Brazil' => 'Rio'];
                            
                            var_dump( $country );
                            
                            
                            
                            ?>
                            
                            <br>
                            
                            <?php 
                                
                                //glob returns an array of files depending on the criteria you give it, i believe its relative
                                print_r(glob("*.php"));
                                
                                
                            ?>
                            
                            
                        </div>
                            
                        
                    </div>
                    
                    <div class="panel-footer">
                        
                    </div>
                    
                </div>
                
            </div>
        </div>
    </div> <!-- container end -->


<?php require( __DIR__ . '/public/includes/footer.php' );?><commit_msg>using a trick to get the basename of a page, with it you can do conditionals to load scripts<commit_after><?php require( __DIR__ . '/public/includes/header.php');?>

    <div class="container clearfix">
        <div class="row">
            <div class="col-xs-12">
                
                <div class="panel panel-default">
                    
                    <div class="panel-heading">
                        <h1>Regex Playground</h1>
                        <h1>&amp;</h1>
                        <h2>Random Php Functions</h2>
                    </div>
                    
                    <div class="panel-body">
                        <?php 
                        
                        $string = 'abcdefghijklmnopqrstuvwxyz';
                        $find = strrpos( $string, 'c' );
                          
                        ?>
                        
                        <?php if( $find === false ): ?>
                            
                            <?php echo 'Your variable was not in the string'; ?>
                            
                        <?php else: ?>
                        
                            <?php echo 'Your variable was found in the string'; ?>
                            
                        <?php endif; ?>
                            
                        <br>
                        
                        <!-- variable -->
                        <?php $reg = preg_match( '/z$/i', $string ); ?>
                        
                        <!-- check if preg_match -->
                        <?php if( $reg === 0 ): ?>
                        
                            <?php echo 'Match not found'; ?>
                            
                        <?php else: ?>
                        
                            <?php echo 'Match found yaaaay'; ?>
                            
                        <?php endif; ?>
                        
                        <br>
                        
                        <div class="col-xs-12">
                        
                            <p>Here I am just playing around with an array</p>
                            <?php
                            
                            $country = [ 
                            
                                'United States' => 'DC',
                                'Canada'        => 'Ontario',
                                'Mexico'        => 'Taco',
                                'Germany'       => 'Munich',
                                'Korea'         => 'Seoul'
                             
                            ];
                            
                            $country[] = ['Brazil' => 'Rio'];
                            
                            var_dump( $country );
                            
                            
                            
                            ?>
                            
                            <br>
                            
                            <?php 
                                
                                //glob returns an array of files depending on the criteria you give it, i believe its relative
                                print_r(glob("*.php"));    
                                
                            ?>
                            
                            <br>
                            
                            <?php 
                            
                            //taking the name of currnet page and stripping any forward slashes
                            $file       =  basename($_SERVER['PHP_SELF']);
                            $pagename   =  str_replace( ".php", "", $file );
                            
                            echo $pagename;
                            
                             ?>
                            
                            
                        </div>
                            
                        
                    </div>
                    
                    <div class="panel-footer">
                        
                    </div>
                    
                </div>
                
            </div>
        </div>
    </div> <!-- container end -->


<?php require( __DIR__ . '/public/includes/footer.php' );?>
{'fraction_non_alphanumeric': 0.08538226299694189, 'fraction_numerical': 0.002691131498470948, 'mean_word_length': 0.43338008415147267, 'pattern_counts': {'":': 0, '<': 97, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2430158', 'n_tokens_mistral': 1638, 'n_tokens_neox': 1487, 'n_words': 341}