Uploading code of php course to github
<p>I am learning a PHP course from Udemy. Can I upload the whole code in my Github without facing any copyright issues ?</p>

<p>If you copy course material to a public repository such as Github, you will be violating Udemy's TOS that says <strong>(emphasis mine)</strong></p>

<blockquote>
  <ol start="7">
  <li>Specific Obligations of Students</li>
  </ol>
  
  <p>As a Student, You represent, warrant and covenant that:</p>
  
  <p>...</p>
  
  <p>You will not <strong>copy</strong>, modify, reverse engineer, <strong>reproduce, distribute, publicly display, publicly perform, communicate to the
  public,</strong> create derivative works from, deface, tarnish, mutilate, hack,
  interfere with, or otherwise use and exploit any Company Content, the
  Services or Courses or Submitted Content except as permitted by these
  Terms or the relevant Instructor as applicable. <a href="https://www.udemy.com/terms/" rel="nofollow noreferrer">Terms of Use | Udemy</a></p>
</blockquote>

<p>And you will be violating Github's TOS, too:</p>

<blockquote>
  <ol start="2">
  <li>Content Restrictions</li>
  </ol>
  
  <p>You agree that you will not under any circumstances upload, post,
  host, or transmit any content that:</p>
  
  <p>...</p>
  
  <p><strong>infringes on any proprietary right of any party,</strong> including patent, trademark, trade secret, <strong>copyright</strong>, right of publicity, or other
  rights. <a href="https://help.github.com/articles/github-terms-of-service/#g-intellectual-property-notice" rel="nofollow noreferrer">GitHub Terms of Service</a></p>
</blockquote>

copyright